From ddbe62abb2cf988a6dd18690c8a2747752dc5115 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Mon, 26 Mar 2018 00:18:37 +0000 Subject: [PATCH] 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 --- zuul/cmd/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zuul/cmd/client.py b/zuul/cmd/client.py index a7b3ef3e99..75219c8aae 100755 --- a/zuul/cmd/client.py +++ b/zuul/cmd/client.py @@ -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,