From 6029f290b85c378c9113a6c8953674aae3292600 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 29 Jul 2020 16:26:06 +0300 Subject: [PATCH] Add missing `encoding="utf8"` --- contrib/devtools/circular-dependencies.py | 2 +- test/util/rpcauth-test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/devtools/circular-dependencies.py b/contrib/devtools/circular-dependencies.py index d544d5c371..abfa5ed5ae 100755 --- a/contrib/devtools/circular-dependencies.py +++ b/contrib/devtools/circular-dependencies.py @@ -37,7 +37,7 @@ for arg in sys.argv[1:]: # TODO: implement support for multiple include directories for arg in sorted(files.keys()): module = files[arg] - with open(arg, 'r') as f: + with open(arg, 'r', encoding="utf8") as f: for line in f: match = RE.match(line) if match: diff --git a/test/util/rpcauth-test.py b/test/util/rpcauth-test.py index bd9a24fe67..53058dc394 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')