Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: confctl: don't create inexistent entities
......................................................................

confctl: don't create inexistent entities

Bug: T104574
Change-Id: I6c18901917a6e6f6cb9ef234720c684faed040bf
---
M conftool/action.py
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/conftool/action.py b/conftool/action.py
index 258aa97..355a7f8 100644
--- a/conftool/action.py
+++ b/conftool/action.py
@@ -39,7 +39,9 @@
             entity_type = self.entity.__class__.__name__,
             return "Deleted %s %s." % (entity_type,
                                        self.entity.name)
-        else:
+        elif self.action == 'set':
+            if not self.entity.exists:
+                raise ActionError("Entity %s doesn't exist" % self.entity.name)
             desc = []
             for (k, v) in self.args.items():
                 msg = "%s: %s changed %s => %s" % (

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c18901917a6e6f6cb9ef234720c684faed040bf
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