From 634bd970013eca90f4b4c1f9044eec8c97ba62c2 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 12 Jun 2018 17:49:20 +0200 Subject: Explicitly specify encoding when opening text files in Python code --- test/util/rpcauth-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/util/rpcauth-test.py') diff --git a/test/util/rpcauth-test.py b/test/util/rpcauth-test.py index 2456feb102..46e9fbc739 100755 --- a/test/util/rpcauth-test.py +++ b/test/util/rpcauth-test.py @@ -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') -- cgit v1.2.3