From: Magnus Hagander Date: Tue, 20 Nov 2018 20:29:22 +0000 (+0100) Subject: Remove spaces in messageids X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=3fce2e6520cc3df5bbc7a2fa876ca7788e63e57a;p=pgarchives.git Remove spaces in messageids They shouldn't be there in the first place. Sigh. But if they're there just pretend they don't exist, so we get a working messageid. --- diff --git a/loader/lib/parser.py b/loader/lib/parser.py index d0e5302..871cea7 100644 --- a/loader/lib/parser.py +++ b/loader/lib/parser.py @@ -343,7 +343,7 @@ class ArchivesParser(object): log.status("Could not parse messageid '%s', ignoring it" % messageid) return None raise IgnorableException("Could not parse message id '%s'" % messageid) - return m.groups(1)[0] + return m.groups(1)[0].replace(' ','') # _date_multi_re = re.compile(' \((\w+\s\w+(\s+\w+)*|)\)$') # Now using [^\s] instead of \w, to work with japanese chars