NL bounces: Fix None printing in error messages
authorNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Mon, 3 Feb 2014 20:06:46 +0000 (21:06 +0100)
committerNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Mon, 3 Feb 2014 20:08:49 +0000 (21:08 +0100)
Invalid bounces with no From headers were reported with 'From="None"' instead of 'From=None'

Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
bin/newsletter.bounces.processor.py

index 6546e88..f315b84 100755 (executable)
@@ -415,7 +415,7 @@ class DirectBouncesFilter(MboxFilter):
             # Additionnal checks, just to be sure
             elif message['From'] != 'MAILER-DAEMON@polytechnique.org (Mail Delivery System)' \
             or message['Subject'] != 'Undelivered Mail Returned to Sender':
-                print('! Not an usual direct bounce (From="%s", Subject="%s").' % (message['From'], message['Subject']))
+                print('! Not an usual direct bounce (From=%r, Subject=%r).' % (message['From'], message['Subject']))
             else:
                 email = findAddressInBounce(message)
                 if email is not None: