Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10670
Modified Files:
Tag: Release_2_1-maint
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.18.2.22
retrieving revision 2.18.2.23
diff -u -d -r2.18.2.22 -r2.18.2.23
--- Scrubber.py 3 Feb 2006 07:55:26 -0000 2.18.2.22
+++ Scrubber.py 19 Feb 2006 21:03:38 -0000 2.18.2.23
@@ -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
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org