[Mailman-Users] A scrubber issue
Todd Zullinger
tmz at pobox.com
Sun Dec 10 02:59:25 CET 2006
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://mail.python.org/pipermail/mailman-users/attachments/20061209/88a52245/attachment.pgp
More information about the Mailman-Users
mailing list