summaryrefslogtreecommitdiff
path: root/Mailman/Handlers
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r--Mailman/Handlers/Decorate.py2
-rw-r--r--Mailman/Handlers/Scrubber.py4
-rw-r--r--Mailman/Handlers/Tagger.py7
3 files changed, 7 insertions, 6 deletions
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py
index 41db3950c..09b6d6c1d 100644
--- a/Mailman/Handlers/Decorate.py
+++ b/Mailman/Handlers/Decorate.py
@@ -121,7 +121,7 @@ def process(mlist, msg, msgdata):
wrap = False
except (LookupError, UnicodeError):
pass
- elif msg.get_type() == 'multipart/mixed':
+ elif msg.get_content_type() == 'multipart/mixed':
# The next easiest thing to do is just prepend the header and append
# the footer as additional subparts
payload = msg.get_payload()
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index 4a4a3c59e..e15ae8beb 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -188,7 +188,7 @@ def process(mlist, msg, msgdata=None):
lcset_out = Charset(lcset).output_charset or lcset
# Now walk over all subparts of this message and scrub out various types
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
@@ -286,7 +286,7 @@ Url: %(url)s
# will transform the url into a hyperlink.
elif part 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
diff --git a/Mailman/Handlers/Tagger.py b/Mailman/Handlers/Tagger.py
index 65ead7f6a..270f6611a 100644
--- a/Mailman/Handlers/Tagger.py
+++ b/Mailman/Handlers/Tagger.py
@@ -69,11 +69,12 @@ def scanbody(msg, numlines=None):
# or if the outer type is multipart/alternative and there is a text/plain
# part. Anything else, and the body is ignored for header-scan purposes.
found = None
- if msg.get_type('text/plain') == 'text/plain':
+ if msg.get_content_type() == 'text/plain':
found = msg
- elif msg.is_multipart() and msg.get_type() == 'multipart/alternative':
+ elif msg.is_multipart()\
+ and msg.get_content_type() == 'multipart/alternative':
for found in msg.get_payload():
- if found.get_type('text/plain') == 'text/plain':
+ if found.get_content_type() == 'text/plain':
break
else:
found = None