Fix logging of load errors
authorMagnus Hagander <magnus@hagander.net>
Wed, 29 Jan 2020 09:32:51 +0000 (10:32 +0100)
committerMagnus Hagander <magnus@hagander.net>
Wed, 29 Jan 2020 09:32:51 +0000 (10:32 +0100)
Broken in python3 migration, shows how often we have load errors these
days.

loader/load_message.py

index f6b64df47bec4ad82cd18a1391c01813494c48d8..079480b6c82dd74c78bc4155e46e5d2906c6b673 100755 (executable)
@@ -24,7 +24,7 @@ def log_failed_message(listid, srctype, src, msg, err):
         msgid = msg.msgid
     except Exception:
         msgid = "<unknown>"
-    log.error("Failed to load message (msgid %s) from %s, spec %s: %s" % (msgid.encode('us-ascii', 'replace'), srctype, src, str(str(err), 'us-ascii', 'replace')))
+    log.error("Failed to load message (msgid %s) from %s, spec %s: %s" % (msgid, srctype, src, err))
 
     # We also put the data in the db. This happens in the main transaction
     # so if the whole script dies, it goes away...