Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18625
Modified Files:
Tag: Release_2_1-maint
Scrubber.py
Log Message:
Provision for part == None case. Closing bug# 1099138
Index: Scrubber.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/Scrubber.py,v
retrieving revision 2.18.2.10
retrieving revision 2.18.2.11
diff -u -d -r2.18.2.10 -r2.18.2.11
--- Scrubber.py 13 Nov 2004 04:39:33 -0000 2.18.2.10
+++ Scrubber.py 12 Jan 2005 04:01:44 -0000 2.18.2.11
@@ -283,7 +283,8 @@
# If the message isn't a multipart, then we'll strip it out as an
# attachment that would have to be separately downloaded. Pipermail
# will transform the url into a hyperlink.
- elif not part.is_multipart():
+ # TK: Confirm also part is not None. (bug-id: 1099138)
+ elif part and not part.is_multipart():
payload = part.get_payload(decode=True)
ctype = part.get_type()
size = len(payload)
@@ -326,7 +327,8 @@
# generalizing to utf-8, and that's probably a good idea (eventually).
text = []
for part in msg.walk():
- if part.get_content_maintype() == 'multipart':
+ # TK: bug-id 1099138 and multipart
+ if not part or part.is_multipart():
continue
# All parts should be scrubbed to text/plain by now.
partctype = part.get_content_type()
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org