You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2016/11/20 23:27:36 UTC

incubator-ponymail git commit: Skip insert if there's nothing to do

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 <se...@apache.org>
Authored: Sun Nov 20 23:27:27 2016 +0000
Committer: Sebb <se...@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()