summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2015-05-15 10:01:56 -0700
committerClark Boylan <clark.boylan@gmail.com>2015-05-15 10:01:56 -0700
commitfd463c84bfb342701061fe383c6d17e7a1bd4786 (patch)
tree70132077d28f08fbaf0885aa555bd6f92753c72c
parent5a412bfc497998c4eef381bbf292fc5784dfee90 (diff)
downloadzuul-fd463c84bfb342701061fe383c6d17e7a1bd4786.tar.gz
Allow all zuul args to be set in zuul-cloner
Previously zuul-cloner required that no zuul-args be set. The intent was that all args be set or none be set and to disallow any partial setting of the zuul args. Add the condition to allow all zuul args to be set by allowing the length of the missing zuul args list to be 0. Change-Id: I944f12aa1148bce7d3998b400e8d6e86fd0164d5
-rwxr-xr-xzuul/cmd/cloner.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/zuul/cmd/cloner.py b/zuul/cmd/cloner.py
index e38892c8f..5bbe3a0ea 100755
--- a/zuul/cmd/cloner.py
+++ b/zuul/cmd/cloner.py
@@ -93,7 +93,8 @@ class Cloner(zuul.cmd.ZuulApp):
# must all be set, otherwise fallback to defaults.
zuul_missing = [zuul_opt for zuul_opt, val in vars(args).items()
if zuul_opt.startswith('zuul') and val is None]
- if len(zuul_missing) < len(ZUUL_ENV_SUFFIXES):
+ if (len(zuul_missing) > 0 and
+ len(zuul_missing) < len(ZUUL_ENV_SUFFIXES)):
parser.error(("Some Zuul parameters are not set:\n\t%s\n"
"Define them either via environment variables or "
"using options above." %