From f579d5c290b80e00974e8c034f9d6dd697fcdfa6 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 30 Nov 2008 20:30:43 -0800 Subject: Now that Python 2.4 is the minimum and we will use more recent installed email packages, convert all the email message get_type() calls to get_content_type(). --- Mailman/Handlers/Scrubber.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Mailman/Handlers/Scrubber.py') diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py index 7f42e5ed..32ba0403 100644 --- a/Mailman/Handlers/Scrubber.py +++ b/Mailman/Handlers/Scrubber.py @@ -189,7 +189,7 @@ def process(mlist, msg, msgdata=None): # Now walk over all subparts of this message and scrub out various types format = delsp = None for part in msg.walk(): - ctype = part.get_type(part.get_default_type()) + ctype = part.get_content_type() # If the part is text/plain, we leave it alone if ctype == 'text/plain': # We need to choose a charset for the scrubbed message, so we'll @@ -300,7 +300,7 @@ URL: %(url)s # will transform the url into a hyperlink. elif part.get_payload() and not part.is_multipart(): payload = part.get_payload(decode=True) - ctype = part.get_type() + ctype = part.get_content_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 # only one part and that part has two blank lines between the -- cgit v1.2.3