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 should be able to import individual files
Date Sat, 29 Oct 2016 22:40:21 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master a4ce196e1 -> 9a964635d


import-mbox.py should be able to import individual files

This fixes #210

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

Branch: refs/heads/master
Commit: 9a964635d5feb4e38aab05807d23a72be17b9d96
Parents: a4ce196
Author: Sebb <sebb@apache.org>
Authored: Sat Oct 29 23:40:12 2016 +0100
Committer: Sebb <sebb@apache.org>
Committed: Sat Oct 29 23:40:12 2016 +0100

----------------------------------------------------------------------
 tools/import-mbox.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/9a964635/tools/import-mbox.py
----------------------------------------------------------------------
diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 7bd2c7f..b34d60c 100644
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -609,7 +609,10 @@ else:
     if maildir:
         lists.append([source, fileToLID.get(source) if fileToLID.get(source) else list_override])
     else:
-        globDir(source)
+        if os.path.isfile(source):
+            lists.append([source, fileToLID.get(source) if fileToLID.get(source) else list_override])
+        else:
+            globDir(source)
 
 
 threads = []


Mime
View raw message