summaryrefslogtreecommitdiff
path: root/src/mailman/handlers
diff options
context:
space:
mode:
authorBarry Warsaw2014-11-19 20:29:44 -0500
committerBarry Warsaw2014-11-19 20:29:44 -0500
commit11af7021249c5827c4c2d72a90fb4dd2321395c0 (patch)
tree01ebe7405568728856294b942fc5a91fe9e3e6e2 /src/mailman/handlers
parent0e9df01a559ee7c6bb0d4d307159ef29497e79c9 (diff)
downloadmailman-11af7021249c5827c4c2d72a90fb4dd2321395c0.tar.gz
mailman-11af7021249c5827c4c2d72a90fb4dd2321395c0.tar.zst
mailman-11af7021249c5827c4c2d72a90fb4dd2321395c0.zip
Fix a few issues with `python2 -3` compatibility.
Diffstat (limited to 'src/mailman/handlers')
-rw-r--r--src/mailman/handlers/mime_delete.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mailman/handlers/mime_delete.py b/src/mailman/handlers/mime_delete.py
index ff6c19ce2..98c1de3f9 100644
--- a/src/mailman/handlers/mime_delete.py
+++ b/src/mailman/handlers/mime_delete.py
@@ -146,7 +146,7 @@ def process(mlist, msg, msgdata):
reset_payload(msg, firstalt)
# If we removed some parts, make note of this
changedp = 0
- if numparts <> len([subpart for subpart in msg.walk()]):
+ if numparts != len([subpart for subpart in msg.walk()]):
changedp = 1
# Now perhaps convert all text/html to text/plain
if mlist.convert_html_to_plaintext and config.HTML_TO_PLAIN_TEXT_COMMAND:
@@ -256,8 +256,8 @@ def to_plaintext(msg):
finally:
try:
os.unlink(filename)
- except OSError, e:
- if e.errno <> errno.ENOENT:
+ except OSError as e:
+ if e.errno != errno.ENOENT:
raise
# Now replace the payload of the subpart and twiddle the Content-Type:
del subpart['content-transfer-encoding']