From 07ae207a47fbcd2f83d080b0784bb0cfbba10070 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 18 Nov 2023 01:32:53 +0300 Subject: [PATCH] Fix(Py3): Reconfigure logs to write in UTF-8 --- check_url.py | 1 + check_urls.py | 1 + 2 files changed, 2 insertions(+) diff --git a/check_url.py b/check_url.py index bb13be2..697d677 100755 --- a/check_url.py +++ b/check_url.py @@ -37,6 +37,7 @@ def run(): from m_lib.flog import makelog log = makelog("check.log") + log.outfile.reconfigure(encoding='utf-8') from robots import robot robot = robot(log) diff --git a/check_urls.py b/check_urls.py index a8f634a..a666ea0 100755 --- a/check_urls.py +++ b/check_urls.py @@ -61,6 +61,7 @@ def run(): log("check_urls started") if report_stats: print(" check_urls: normal start") + log.outfile.reconfigure(encoding='utf-8') from storage import storage storage = storage() -- 2.39.5