From: Magnus Hagander Date: Wed, 29 Jan 2020 09:32:51 +0000 (+0100) Subject: Fix logging of load errors X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=afc63a3e9431c305809eea8deaa9dacfcc683cf6;p=pgarchives.git Fix logging of load errors Broken in python3 migration, shows how often we have load errors these days. --- diff --git a/loader/load_message.py b/loader/load_message.py index f6b64df..079480b 100755 --- a/loader/load_message.py +++ b/loader/load_message.py @@ -24,7 +24,7 @@ def log_failed_message(listid, srctype, src, msg, err): msgid = msg.msgid except Exception: msgid = "" - 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...