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: crash in import-mbox when list-id is missing and --lid is not provided
Date Mon, 30 Jan 2017 15:52:16 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 7d550b4ce -> c9b0b3c4d


crash in import-mbox when list-id is missing and --lid is not provided 

Thus fixes #358

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

Branch: refs/heads/master
Commit: c9b0b3c4d15db7d55122d5d34ad193a3545b9e61
Parents: 7d550b4
Author: Sebb <sebb@apache.org>
Authored: Mon Jan 30 15:52:01 2017 +0000
Committer: Sebb <sebb@apache.org>
Committed: Mon Jan 30 15:52:01 2017 +0000

----------------------------------------------------------------------
 CHANGELOG.md         | 1 +
 tools/import-mbox.py | 7 +++++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/c9b0b3c4/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 85c6d0f..2763b42 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -136,6 +136,7 @@
 - useless conditional when fetching id parameter (#353)
 - ES 5.0 no longer supports the write consistency option for index(); archiver fails (#351)
 - Cookie should use httpOnly and Secure (#355)
+- crash in import-mbox when list-id is missing and --lid is not provided (#358)
 
 
 ## CHANGES in 0.9b:

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/c9b0b3c4/tools/import-mbox.py
----------------------------------------------------------------------
diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 206151b..90169c0 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -261,8 +261,15 @@ class SlurpThread(Thread):
                     self.printid("Whoa, this is taking way too long, ignoring %s for now"
% tmpname)
                     break
 
+                # Don't pass message to archiver unless we have a list id
+                if not (list_override or message['list-id']):
+                    self.printid("No list id found for %s " % message['message-id'])
+                    bad += 1
+                    continue
+
                 json, contents = archie.compute_updates(list_override, private, message)
                 
+                # Not sure this can ever happen
                 if json and not (json['list'] and json['list_raw']):
                     self.printid("No list id found for %s " % json['message-id'])
                     bad += 1


Mime
View raw message