From 3bbe434df3cdeae0585bd481334e52a154ade229 Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Wed, 13 Jul 2005 06:31:01 +0000 Subject: A part can be None type in Python2.4 if multipart/mixed without real content. Temporary work around to ignore such case. --- Mailman/Handlers/Scrubber.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py index 24bb575f..564d4f1a 100644 --- a/Mailman/Handlers/Scrubber.py +++ b/Mailman/Handlers/Scrubber.py @@ -284,6 +284,9 @@ Url: %(url)s # will transform the url into a hyperlink. elif part and not part.is_multipart(): payload = part.get_payload(decode=True) + if type(payload) <> StringType: + # What other type can this be ? Skip this. + continue ctype = part.get_type() # XXX Under email 2.5, it is possible that payload will be None. # This can happen when you have a Content-Type: multipart/* with -- cgit v1.2.3