Merge pull request #456 from lokkelvin2/patch

Fix for #454
This commit is contained in:
Eren Gölge 2020-07-13 17:16:05 +02:00 committed by GitHub
commit 599c2dbcff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ class AttrDict(dict):
def load_config(config_path):
config = AttrDict()
with open(config_path, "r") as f:
with open(config_path, "r", encoding = "utf-8") as f:
input_str = f.read()
input_str = re.sub(r'\\\n', '', input_str)
input_str = re.sub(r'//.*\n', '\n', input_str)
@ -23,7 +23,7 @@ def load_config(config_path):
def copy_config_file(config_file, out_path, new_fields):
config_lines = open(config_file, "r").readlines()
config_lines = open(config_file, "r", encoding = "utf-8").readlines()
# add extra information fields
for key, value in new_fields.items():
if isinstance(value, str):