Comment 6 for bug 265930

Revision history for this message
Q7joey (q7joey) wrote :

i have a few line patch that seems to make it do what is
expected.

i can't see how to attach via sourceforge yet, so i'll paste
it here:

---
/usr/local/src/mailman-2.1.2/Mailman/Handlers/Scrubber.py
Fri Feb 7 23:13:50 2003
+++ ./Scrubber.py Sat Sep 27 08:58:46 2003
@@ -286,11 +286,13 @@
         # BAW: Martin's original patch suggested we might
want to try
         # generalizing to utf-8, and that's probably a good
idea (eventually).
         text = []
- for part in msg.get_payload():
+ for part in msg.walk():
+ if part.get_main_type() == 'multipart':
+ continue
             # All parts should be scrubbed to text/plain by
now.
             partctype = part.get_content_type()
             if partctype <> 'text/plain':
- text.append(_('Skipped content of type
%(partctype)s'))
+ text.append(_('Skipped content of type
%(partctype)s\n'))
                 continue
             try:
                 t = part.get_payload(decode=1)