autohold: prevent using ',' in change argument

The autohold command doesn't support patchset number and the list command
fails with ValueError. This change prevents adding an autohold on a
fully described change,patchset gerrit change.

Change-Id: I1be7e5c90526bab7e5eefe715bb103ff3a9b2584
This commit is contained in:
Tristan Cacqueray 2018-03-26 00:18:37 +00:00
parent c5b9dd2480
commit ddbe62abb2
1 changed files with 3 additions and 0 deletions

View File

@ -181,6 +181,9 @@ class Client(zuul.cmd.ZuulApp):
if self.args.change and self.args.ref:
print("Change and ref can't be both used for the same request")
return False
if "," in self.args.change:
print("Error: change argument can not contain any ','")
return False
r = client.autohold(tenant=self.args.tenant,
project=self.args.project,