aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Scrubber.py
diff options
context:
space:
mode:
authormsapiro <>2006-02-19 21:03:38 +0000
committermsapiro <>2006-02-19 21:03:38 +0000
commitbfad4a96aa95c99d00a1bd4f120bd1c55a294664 (patch)
treeac235d90774e4893963f7ff4cb7e1d66841d333c /Mailman/Handlers/Scrubber.py
parent03cb2bdc170d1ced6e69f75e51198871f378f557 (diff)
downloadmailman2-bfad4a96aa95c99d00a1bd4f120bd1c55a294664.tar.gz
mailman2-bfad4a96aa95c99d00a1bd4f120bd1c55a294664.tar.xz
mailman2-bfad4a96aa95c99d00a1bd4f120bd1c55a294664.zip
Fixed bug 1430236 by catching TypeError when trying to get a decoded payload
when payload is None.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Scrubber.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index 712280a7..4a4a3c59 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -343,7 +343,12 @@ Url : %(url)s
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