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: edit-list.py does not honour --test with --desc
Date Fri, 11 Nov 2016 22:43:13 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master e576e469c -> ab78f8914


edit-list.py does not honour --test with --desc

This fixes #237

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

Branch: refs/heads/master
Commit: ab78f89141e4c7baa635c4563c97a40ba42a4f1e
Parents: e576e46
Author: Sebb <sebb@apache.org>
Authored: Fri Nov 11 22:43:02 2016 +0000
Committer: Sebb <sebb@apache.org>
Committed: Fri Nov 11 22:43:02 2016 +0000

----------------------------------------------------------------------
 tools/edit-list.py | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/ab78f891/tools/edit-list.py
----------------------------------------------------------------------
diff --git a/tools/edit-list.py b/tools/edit-list.py
index add3aff..0324e46 100755
--- a/tools/edit-list.py
+++ b/tools/edit-list.py
@@ -134,19 +134,22 @@ if obfuscate:
 count = 0
 
 if desc:
-    LID = sourceLID
-    if targetLID:
-        LID = targetLID
-    es.index(
-        index=dbname,
-        doc_type="mailinglists",
-        id=LID,
-        body = {
-            'list': LID,
-            'name': LID,
-            'description': desc
-        }
-    )
+    if dryrun:
+        print("DRY RUN - NO CHANGES WILL BE MADE")
+    else:
+        LID = sourceLID
+        if targetLID:
+            LID = targetLID
+        es.index(
+            index=dbname,
+            doc_type="mailinglists",
+            id=LID,
+            body = {
+                'list': LID,
+                'name': LID,
+                'description': desc
+            }
+        )
 
 if targetLID or makePrivate or makePublic or deleteEmails or mid:
     if dryrun:


Mime
View raw message