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 --project qualifier regex error
Date Sat, 05 Nov 2016 17:57:04 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 7f158c95e -> b2fa43a3a


import-mbox.py --project qualifier regex error

This fixes #229

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

Branch: refs/heads/master
Commit: b2fa43a3a1ffb78e19749d724ff54b2603d4d915
Parents: 7f158c9
Author: Sebb <sebb@apache.org>
Authored: Sat Nov 5 17:56:50 2016 +0000
Committer: Sebb <sebb@apache.org>
Committed: Sat Nov 5 17:56:50 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/b2fa43a3/tools/import-mbox.py
----------------------------------------------------------------------
diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index a39f4d7..1fbca8d 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -442,7 +442,9 @@ if re.match(r"https?://", source):
     data = urlopen(source).read().decode('utf-8')
     print("Fetched %u bytes of main data, parsing month lists" % len(data))
     
-    ns = r"<a href='(%s[-a-z0-9]+)/'" % project
+    # ensure there is a '-' between project and list name otherwise we match too much
+    # Note: It looks like mod_mbox always uses single quoted hrefs
+    ns = r"<a href='(%s-[-a-z0-9]+)/'" % project
     if project.find("-") != -1:
         ns = r"<a href='(%s)/'" % project
     
@@ -487,7 +489,7 @@ if re.match(r"https?://", source):
             qn += 1
             if quickmode and qn >= 2:
                 break
-                    
+    die               
 # IMAP(S) based import?
 elif re.match(r"imaps?://", source):
     imap = True


Mime
View raw message