Add missing encoding="utf8"

This commit is contained in:
UdjinM6 2020-07-29 16:26:06 +03:00 committed by pasta
parent 35fbb5992f
commit 6029f290b8
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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')