mailman-checkins@python.org
[Top] [All Lists]

[Mailman-checkins] mailman/Mailman/Handlers Scrubber.py,2.33,2.34

Subject: [Mailman-checkins] mailman/Mailman/Handlers Scrubber.py,2.33,2.34
From:
Date: Sun, 19 Feb 2006 13:04:02 -0800
Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10728

Modified Files:
        Scrubber.py 
Log Message:
Fixed bug 1430236 by catching TypeError when trying to get a decoded payload
when payload is None.

Index: Scrubber.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/Scrubber.py,v
retrieving revision 2.33
retrieving revision 2.34
diff -u -d -r2.33 -r2.34
--- Scrubber.py 3 Feb 2006 08:11:09 -0000       2.33
+++ Scrubber.py 19 Feb 2006 21:03:59 -0000      2.34
@@ -343,7 +343,12 @@
                 continue
             try:
                 t = part.get_payload(decode=True)
-            except binascii.Error:
+            # MAS: TypeError exception can occur if payload is None. This
+            # was observed with a message that contained an attached
+            # message/delivery-status part. Because of the special parsing
+            # of this type, this resulted in a text/plain sub-part with a
+            # null body. See bug 1430236.
+            except (binascii.Error, TypeError):
                 t = part.get_payload()
             # TK: get_content_charset() returns 'iso-2022-jp' for internally
             # crafted (scrubbed) 'euc-jp' text part. So, first try

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@xxxxxxxxxx
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/mailarch%40xy1.org

<Prev in Thread] Current Thread [Next in Thread>
  • [Mailman-checkins] mailman/Mailman/Handlers Scrubber.py,2.33,2.34, msapiro <=