Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8196

Modified Files:
      Tag: Release_2_1-maint
        Scrubber.py 
Log Message:
A part can be None type in Python2.4 if multipart/mixed without real content.
Temporary work around to ignore such case.


Index: Scrubber.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/Scrubber.py,v
retrieving revision 2.18.2.13
retrieving revision 2.18.2.14
diff -u -d -r2.18.2.13 -r2.18.2.14
--- Scrubber.py 22 May 2005 19:55:08 -0000      2.18.2.13
+++ Scrubber.py 13 Jul 2005 06:31:01 -0000      2.18.2.14
@@ -284,6 +284,9 @@
         # 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

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to