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: Skip insert if there's nothing to do
Date Sun, 20 Nov 2016 23:27:36 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master af1544e7b -> 9c9873bec


Skip insert if there's nothing to do

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

Branch: refs/heads/master
Commit: 9c9873bec101464570c93375bce8acaa06bb8159
Parents: af1544e
Author: Sebb <sebb@apache.org>
Authored: Sun Nov 20 23:27:27 2016 +0000
Committer: Sebb <sebb@apache.org>
Committed: Sun Nov 20 23:27:27 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/9c9873be/tools/import-mbox.py
----------------------------------------------------------------------
diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 12bc0d1..dcddfe6 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -339,13 +339,13 @@ class SlurpThread(Thread):
                 
             y += count
             baddies += bad
-            if not args.dry:
+            if len(ja) > 0 and not args.dry:
                 bulk = BulkThread()
                 bulk.assign(self.id, ja, es, 'mbox')
                 bulk.insert()
             ja = []
             
-            if not args.dry:
+            if len(jas) > 0 and not args.dry:
                 bulks = BulkThread()
                 bulks.assign(self.id, jas, es, 'mbox_source')
                 bulks.insert()


Mime
View raw message