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 8473d04  Refactor for efficiency
8473d04 is described below

commit 8473d04165b224ba923065240af04f8e3b3bc691
Author: Daniel Gruno <[email protected]>
AuthorDate: Mon Aug 10 17:03:50 2020 +0200

    Refactor for efficiency
---
 tools/archiver.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/archiver.py b/tools/archiver.py
index bcd90d7..43df7df 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -105,10 +105,7 @@ def parse_attachment(part):
             filename = part.get_filename()
             if filename:
                 print("Found attachment: %s" % filename)
-                attachment = {}
-                attachment['content_type'] = part.get_content_type()
-                attachment['size'] = len(fd)
-                attachment['filename'] = filename
+                attachment = {'content_type': part.get_content_type(), 'size': 
len(fd), 'filename': filename}
                 h = hashlib.sha256(fd).hexdigest()
                 b64 = encode_base64(fd)
                 attachment['hash'] = h

Reply via email to