Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/226682

Change subject: confctl: fix warning on regexes
......................................................................

confctl: fix warning on regexes

Change-Id: I9d2c4a7ed42605282b142eac8762892b98117686
---
M conftool/cli/tool.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/conftool 
refs/changes/82/226682/1

diff --git a/conftool/cli/tool.py b/conftool/cli/tool.py
index a7de85d..5105117 100644
--- a/conftool/cli/tool.py
+++ b/conftool/cli/tool.py
@@ -36,10 +36,11 @@
         objlist = [k for (k,v) in KVObject.backend.driver.ls(cur_dir)]
         retval = [objname for objname in objlist if r.match(objname)]
         warn = (len(objlist) <= 2 * len(retval))
-    if warn and act in ['set', 'del']:
+    if warn and act[0:3] in ['set', 'del']:
         raise_warning()
     return retval
 
+
 def raise_warning():
     if not sys.stdin.isatty() or not sys.stdout.isatty():
         print "Destructive operations are not scriptable"

-- 
To view, visit https://gerrit.wikimedia.org/r/226682
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d2c4a7ed42605282b142eac8762892b98117686
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/conftool
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to