ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject incubator-ponymail git commit: import-mbox.py: mailbox defaults to Create if file is not found
Date Mon, 01 May 2017 14:58:25 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master a5fdcfe07 -> f70d824d4


import-mbox.py: mailbox defaults to Create if file is not found

This fixes #370

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/f70d824d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/f70d824d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/f70d824d

Branch: refs/heads/master
Commit: f70d824d49f827ccb6cbc76c439b985d9403b85a
Parents: a5fdcfe
Author: Sebb <sebb@apache.org>
Authored: Mon May 1 15:58:20 2017 +0100
Committer: Sebb <sebb@apache.org>
Committed: Mon May 1 15:58:20 2017 +0100

----------------------------------------------------------------------
 CHANGELOG.md         | 1 +
 tools/import-mbox.py | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/f70d824d/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8514b1..534170b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -146,6 +146,7 @@
 - Bug: archiver stores attachment binary data types with embedded newlines (#262)
 - Bug: may corrupt 8bit message source if it is not encoded in UTF-8 (#366)
 - Enh: make debug info optional (#369)
+- import-mbox.py: mailbox defaults to Create if file is not found (#370)
 
 ## CHANGES in 0.9b:
 

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/f70d824d/tools/import-mbox.py
----------------------------------------------------------------------
diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 90169c0..d603006 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -184,7 +184,7 @@ class SlurpThread(Thread):
             stime = time.time()
             dFile = False
             if maildir:
-                messages = mailbox.Maildir(tmpname)
+                messages = mailbox.Maildir(tmpname, create=False)
             elif imap:
                 imap4 = mla[2]
                 def mailgen(list):
@@ -214,7 +214,7 @@ class SlurpThread(Thread):
                     except Exception as err:
                         self.printid("This wasn't a gzip file: %s" % err )
                 self.printid("Slurping %s" % filename)
-                messages = mailbox.mbox(tmpname, MboxoFactory)
+                messages = mailbox.mbox(tmpname, MboxoFactory, create=False)
 
             else:
                 ml = mla[0]
@@ -233,7 +233,7 @@ class SlurpThread(Thread):
                 with open(tmpname, "w") as f:
                     f.write(inp)
                     f.close()
-                messages = mailbox.mbox(tmpname)
+                messages = mailbox.mbox(tmpname, create=False)
 
             count = 0
             bad = 0


Mime
View raw message