diff options
author | Clark Boylan <clark.boylan@gmail.com> | 2015-05-15 10:01:56 -0700 |
---|---|---|
committer | Clark Boylan <clark.boylan@gmail.com> | 2015-05-15 10:01:56 -0700 |
commit | fd463c84bfb342701061fe383c6d17e7a1bd4786 (patch) | |
tree | 70132077d28f08fbaf0885aa555bd6f92753c72c /zuul/cmd/cloner.py | |
parent | 5a412bfc497998c4eef381bbf292fc5784dfee90 (diff) | |
download | zuul-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
Diffstat (limited to 'zuul/cmd/cloner.py')
-rwxr-xr-x | zuul/cmd/cloner.py | 3 |
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." % |