You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/09/20 16:16:22 UTC

[incubator-ponymail-foal] branch master updated: account for unicode Header classes

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 64e4aa8  account for unicode Header classes
64e4aa8 is described below

commit 64e4aa88e68d60be6324c709f993a1d9aea7fce8
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Sep 20 11:16:17 2021 -0500

    account for unicode Header classes
---
 tools/import-mbox.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 887b29a..93bf392 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -286,8 +286,8 @@ class SlurpThread(Thread):
                 
                 # If fetched from Pipermail, we have to revert/reconstruct From: headers sometimes,
                 # before we can pass it off to final archiving.
-                if args.pipermail and " at " in message.get("from"):
-                    m = re.match(r"^(\S+) at (\S+) \((.+)\)$", message["from"])
+                if args.pipermail and " at " in str(message.get("from")):
+                    m = re.match(r"^(\S+) at (\S+) \((.+)\)$", str(message["from"]))
                     if m:
                         message.replace_header("from", "%s <%s@%s>" % (m.group(3), m.group(1), m.group(2)))