You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2020/08/10 15:07:22 UTC

[incubator-ponymail] branch master updated: Comparfison with None should be done using 'is', tweak whitespace (don't put the result on the same line)

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git


The following commit(s) were added to refs/heads/master by this push:
     new dd4a9dc  Comparfison with None should be done using 'is', tweak whitespace (don't put the result on the same line)
dd4a9dc is described below

commit dd4a9dc36ff077704c0de7d4e16971006ef25827
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Aug 10 17:07:13 2020 +0200

    Comparfison with None should be done using 'is', tweak whitespace (don't put the result on the same line)
---
 tools/archiver.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 @@ def parse_attachment(part):
         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)