]> git.phdru.name Git - bookmarks_db.git/commitdiff
Feat: Open log files in UTF-8 encoding
authorOleg Broytman <phd@phdru.name>
Tue, 14 Nov 2023 17:56:26 +0000 (20:56 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 14 Nov 2023 18:03:07 +0000 (21:03 +0300)
check_redirects.py
check_title.py

index 1f5c2b01137a53b05b725e204995a1996656bb41..c9161d9016a7d1318e823e9cac4b8322aa47e52e 100755 (executable)
@@ -48,7 +48,7 @@ def run():
         sys.exit(1)
 
     if log_filename:
-        log_file = open(log_filename, 'wt')
+        log_file = open(log_filename, 'wt', encoding='utf-8')
 
     from storage import storage
     storage = storage()
index c30e025d25ffd2bd89b027ad31d35a3167afc9b8..391f5a147ec5882fbb3541604f9b741a3670377b 100755 (executable)
@@ -52,7 +52,7 @@ def run():
         sys.exit(1)
 
     if log_filename:
-        log_file = open(log_filename, 'wt')
+        log_file = open(log_filename, 'wt', encoding='utf-8')
 
     from storage import storage
     storage = storage()
@@ -81,7 +81,7 @@ def run():
                 unquoted_title = unquote_title(quote_title(object.real_title))
                 unquoted_name = unquote_title(object.name)
                 if unquoted_name != unquoted_title:
-                    report_title(object.href, unquoted_name unquoted_title)
+                    report_title(object.href, unquoted_name, unquoted_title)
             else:
                 report_title(object.href, object.name, None)