summaryrefslogtreecommitdiff
path: root/src/mailman/handlers/tagger.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/handlers/tagger.py')
-rw-r--r--src/mailman/handlers/tagger.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mailman/handlers/tagger.py b/src/mailman/handlers/tagger.py
index 803cc6d11..199c5907f 100644
--- a/src/mailman/handlers/tagger.py
+++ b/src/mailman/handlers/tagger.py
@@ -17,9 +17,6 @@
"""Extract topics from the original mail message."""
-from __future__ import absolute_import, print_function, unicode_literals
-
-__metaclass__ = type
__all__ = [
'Tagger',
]
@@ -29,15 +26,14 @@ import re
import email.iterators
import email.parser
-from zope.interface import implementer
-
from mailman.core.i18n import _
from mailman.interfaces.handler import IHandler
+from zope.interface import implementer
OR = '|'
CRNL = '\r\n'
-EMPTYBYTES = b''
+EMPTYSTRING = ''
NLTAB = '\n\t'
@@ -104,7 +100,7 @@ def scanbody(msg, numlines=None):
reader = list(email.iterators.body_line_iterator(msg))
while numlines is None or lineno < numlines:
try:
- line = bytes(reader.pop(0))
+ line = reader.pop(0)
except IndexError:
break
# Blank lines don't count
@@ -115,7 +111,7 @@ def scanbody(msg, numlines=None):
# Concatenate those body text lines with newlines, and then create a new
# message object from those lines.
p = _ForgivingParser()
- msg = p.parsestr(EMPTYBYTES.join(lines))
+ msg = p.parsestr(EMPTYSTRING.join(lines))
return msg.get_all('subject', []) + msg.get_all('keywords', [])