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/18 09:25:03 UTC

[incubator-ponymail-foal] branch master updated: linting and quote consistency

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-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 3425330  linting and quote consistency
3425330 is described below

commit 3425330bb25477e18c8daf07aa760ac0e0e4e37e
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Aug 18 11:24:37 2020 +0200

    linting and quote consistency
---
 tools/import-mbox.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 719c07c..f1e2a3a 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -721,14 +721,14 @@ elif re.match(r"imaps?://", source):
     if url.hostname is not None:
         if url.scheme == "imap":
             imap4 = imaplib.IMAP4(url.hostname, port)
-        elif url.scheme == 'imaps':
+        elif url.scheme == "imaps":
             imap4 = imaplib.IMAP4_SSL(url.hostname, port)
     else:
         raise Exception("Hostname not found in IMAP source URL")
     imap4.login(user, password)
     imap4.select(folder, readonly=True)
     results = imap4.uid("search", "ALL")
-    uids = b",".join(results[1][0].split()).decode('ascii')
+    uids = b",".join(results[1][0].split()).decode("ascii")
     results = imap4.uid("fetch", uids, "(BODY[HEADER.FIELDS (MESSAGE-ID)])")
 
     mail = {}
@@ -757,7 +757,12 @@ elif re.match(r"imaps?://", source):
     for mid, _id in db.items():
         if mid not in mail:
             queue1.append(
-                {"_op_type": "delete", "_index": es.db_mbox, "_type": "mbox", "_id": _id}
+                {
+                    "_op_type": "delete",
+                    "_index": es.db_mbox,
+                    "_type": "mbox",
+                    "_id": _id,
+                }
             )
             queue2.append(
                 {