From b41dc5ea725e6632db7e75644645166cae493b72 Mon Sep 17 00:00:00 2001 From: Marcin Usielski Date: Tue, 6 Feb 2024 10:06:00 +0100 Subject: [PATCH] encoding --- moler/config/__init__.py | 2 +- moler/config/loggers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moler/config/__init__.py b/moler/config/__init__.py index e633299e3..ca1c51834 100644 --- a/moler/config/__init__.py +++ b/moler/config/__init__.py @@ -29,7 +29,7 @@ def read_configfile(path): :return: configuration file content as string """ - with open(path, "r") as config_file: + with open(path, "r", encoding="utf-8") as config_file: content = config_file.read() yield content diff --git a/moler/config/loggers.py b/moler/config/loggers.py index cd513cba9..9f467a8cc 100644 --- a/moler/config/loggers.py +++ b/moler/config/loggers.py @@ -103,7 +103,7 @@ def _get_moler_version_cloned_from_git_repository(setup_py_path): version = "UNKNOWN" if os.path.isfile(setup_py_path): - with open(setup_py_path, "r") as f: + with open(setup_py_path, "r", encoding="utf-8") as f: for line in f: search_version = re.search( r"version\s*=\s*\'(?P\d+\.\d+\.\d+)", line