From fd463c84bfb342701061fe383c6d17e7a1bd4786 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 15 May 2015 10:01:56 -0700 Subject: 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 --- zuul/cmd/cloner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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." % -- cgit v1.2.1