summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/Tagger.py
diff options
context:
space:
mode:
authorbwarsaw2001-10-09 23:17:39 +0000
committerbwarsaw2001-10-09 23:17:39 +0000
commitc6486ef10753ccdc20adb9ba44c15f4fdf91c13e (patch)
tree729750d547b603e582f24b72e1c31235dcfcfd22 /Mailman/Handlers/Tagger.py
parent28c68a0336e9fb78dfa06e92cba87c6a917032e6 (diff)
downloadmailman-c6486ef10753ccdc20adb9ba44c15f4fdf91c13e.tar.gz
mailman-c6486ef10753ccdc20adb9ba44c15f4fdf91c13e.tar.zst
mailman-c6486ef10753ccdc20adb9ba44c15f4fdf91c13e.zip
Diffstat (limited to 'Mailman/Handlers/Tagger.py')
-rw-r--r--Mailman/Handlers/Tagger.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Mailman/Handlers/Tagger.py b/Mailman/Handlers/Tagger.py
index 220dd884f..005f3760b 100644
--- a/Mailman/Handlers/Tagger.py
+++ b/Mailman/Handlers/Tagger.py
@@ -24,7 +24,7 @@ import email.Iterators
from Mailman.Logging.Syslog import syslog
CRNL = '\r\n'
-NL = '\n'
+EMPTYSTRING = ''
NLTAB = '\n\t'
@@ -67,11 +67,11 @@ 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.gettype('text/plain') == 'text/plain':
+ if msg.get_type('text/plain') == 'text/plain':
found = msg
- elif msg.ismultipart() and msg.gettype() == 'multipart/alternative':
+ elif msg.is_multipart() and msg.get_type() == 'multipart/alternative':
for found in msg.get_payload():
- if found.gettype('text/plain') == 'text/plain':
+ if found.get_type('text/plain') == 'text/plain':
break
else:
found = None
@@ -98,5 +98,5 @@ def scanbody(msg, numlines=None):
lines.append(line)
# Concatenate those body text lines with newlines, and then create a new
# message object from those lines.
- msg = email.message_from_string(NL.join(lines))
- return msg.getall('subject', []) + msg.getall('keywords', [])
+ msg = email.message_from_string(EMPTYSTRING.join(lines))
+ return msg.get_all('subject', []) + msg.get_all('keywords', [])