Commit 5189cbaa authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Windows: Fix logging file encoding.

No related merge requests found
Pipeline #54967 passed with stages
in 3 minutes and 22 seconds
Showing with 3 additions and 3 deletions
+3 -3
......@@ -48,7 +48,7 @@ try:
log = os.path.join(
os.path.dirname(Config.filename()), "log.txt"
)
logfile = open(log, "w+")
logfile = open(log, "w+", encoding="utf-8")
handler = logging.StreamHandler(logfile)
formatter = logging.Formatter('[%(asctime)s][%(levelname)s] %(message)s')
handler.setFormatter(formatter)
......@@ -68,7 +68,7 @@ def legal_info():
os.path.dirname(__file__),
"motd.txt"
)
), "r") as f:
), "r", encoding="utf-8") as f:
for line in f:
blue(line.rstrip())
......@@ -77,7 +77,7 @@ def legal_info():
os.path.dirname(__file__),
"VERSION"
)
), "r") as f:
), "r", encoding="utf-8") as f:
version = f.readline().strip()
logger.info(
f"version: {logger_color_green()}{version}{logger_color_reset()}")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment