aboutsummaryrefslogtreecommitdiffstats
path: root/mail2news.py
diff options
context:
space:
mode:
Diffstat (limited to 'mail2news.py')
-rw-r--r--mail2news.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/mail2news.py b/mail2news.py
index eae03b0..0091cf4 100644
--- a/mail2news.py
+++ b/mail2news.py
@@ -14,9 +14,7 @@ Gets news email and sends it via SMTP.
class mail2news is hopefully conform to rfc850.
"""
-from __future__ import absolute_import
-from __future__ import print_function
-import io
+from io import StringIO
from collections import OrderedDict
import email
import logging
@@ -89,7 +87,7 @@ class mail2news(object):
"""
try:
- for key in self.message.keys():
+ for key in list(self.message.keys()):
if key.startswith('Resent-'):
if ('X-' + key) in self.message:
self.message['X-Original-' + key] = \
@@ -147,7 +145,7 @@ class mail2news(object):
others, X-*, X-Resent-* last"""
heads_dict = OrderedDict(self.message)
- for hdr in self.message.keys():
+ for hdr in list(self.message.keys()):
del self.message[hdr]
# put at top