diff options
Diffstat (limited to 'patchwork/parser.py')
-rw-r--r-- | patchwork/parser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/patchwork/parser.py b/patchwork/parser.py index a09fd75..dce03a4 100644 --- a/patchwork/parser.py +++ b/patchwork/parser.py @@ -373,6 +373,13 @@ def get_original_sender(mail, name, email): # Mailman uses the format "<name> via <list>" # Google Groups uses "'<name>' via <list>" stripped_name = name[:name.rfind(' via ')].strip().strip("'") + elif name.endswith(' via'): + # Sometimes this seems to happen (perhaps if Mailman isn't set up with + # any list name) + stripped_name = name[:name.rfind(' via')].strip().strip("'") + else: + # We've hit a format that we don't expect + stripped_name = None original_from = clean_header(mail.get('X-Original-From', '')) if original_from: |