Comparfison with None should be done using 'is', tweak whitespace (don't put the result on the same line)
diff --git a/tools/archiver.py b/tools/archiver.py
index 4bd77eb..b97db76 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -102,7 +102,8 @@
if cdtype == "attachment" or cdtype == 'inline':
fd = part.get_payload(decode=True)
# Allow for empty string
- if fd == None: return None, None
+ if fd is None:
+ return None, None
filename = part.get_filename()
if filename:
print("Found attachment: %s" % filename)