mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
Explicitly specify encoding when opening text files in Python code
This commit is contained in:
@@ -18,7 +18,7 @@ class TestRPCAuth(unittest.TestCase):
|
||||
config_path = os.path.abspath(
|
||||
os.path.join(os.sep, os.path.abspath(os.path.dirname(__file__)),
|
||||
"../config.ini"))
|
||||
with open(config_path) as config_file:
|
||||
with open(config_path, encoding="utf8") as config_file:
|
||||
config.read_file(config_file)
|
||||
sys.path.insert(0, os.path.dirname(config['environment']['RPCAUTH']))
|
||||
self.rpcauth = importlib.import_module('rpcauth')
|
||||
|
Reference in New Issue
Block a user