Mark Sapiro wrote: > In another reply, I suggested a simpler change Yeah, I should have just waited a little longer before posting a half-baked diff. :-)
> In order to fix the bug we really only need to skip parts with payload > = None so if we want to keep the 'empty' part, the fix should be > > --- Scrubber.py~ 2006-10-01 16:28:57.000000000 -0400 > +++ Scrubber.py 2006-12-09 11:41:25.000000000 -0500 > @@ -334,7 +334,7 @@ > text = [] > for part in msg.walk(): > # TK: bug-id 1099138 and multipart > - if not part or part.is_multipart(): > + if part.get_payload() == None or part.is_multipart(): > continue > # All parts should be scrubbed to text/plain by now. > partctype = part.get_content_type() That looks nice. As Tokio has said since, the email package is improved now and it may not even be necessary to test the get_payload output. That's up to you guys though, you've seen far more odd things people try to archive than I want to see. :) -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ====================================================================== I got nasty habits. I take tea at 3. -- Rolling Stones, Live with Me
pgp3IWB3ZEYzc.pgp
Description: PGP signature
------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp