diff options
author | Mark Sapiro <mark@msapiro.net> | 2008-11-30 20:30:43 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2008-11-30 20:30:43 -0800 |
commit | f579d5c290b80e00974e8c034f9d6dd697fcdfa6 (patch) | |
tree | 7ad0054577c7e457a94ecec5cd55d0003c2c2f08 /Mailman/Handlers/Scrubber.py | |
parent | 0e6f7c1fc99eb7e35c23695bca2c17e757baf514 (diff) | |
download | mailman2-f579d5c290b80e00974e8c034f9d6dd697fcdfa6.tar.gz mailman2-f579d5c290b80e00974e8c034f9d6dd697fcdfa6.tar.xz mailman2-f579d5c290b80e00974e8c034f9d6dd697fcdfa6.zip |
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().
Diffstat (limited to 'Mailman/Handlers/Scrubber.py')
-rw-r--r-- | Mailman/Handlers/Scrubber.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |