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

sebb 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 4f72d53  Buffer=1 does not make sense in binary mode
4f72d53 is described below

commit 4f72d536e5719c814542afca5c13f05674a411df
Author: Sebb <[email protected]>
AuthorDate: Sat Dec 4 15:44:08 2021 +0000

    Buffer=1 does not make sense in binary mode
---
 tools/import-mbox.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 7a08de7..b852752 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -112,13 +112,13 @@ def bulk_insert(name, json, xes, dbindex, wc="quorum"):
     except Exception as err:
         print("%s: Warning: Could not bulk insert: %s into %s" % (name, err, 
dbindex))
 
-class DownloadThread(Thread):
+class DownloadThread(Thread): # handles Pipermail
     def assign(self, url):
         self.url = url
     def run(self):
         global lists
         mldata = urlopen(self.url).read()
-        tmpfile = tempfile.NamedTemporaryFile(mode="w+b", buffering=1, 
delete=False)
+        tmpfile = tempfile.NamedTemporaryFile(mode="w+b", delete=False)
         try:
             if ml.find(".gz") != -1:
                 mldata = gzip.decompress(mldata)

Reply via email to