From 4bae0df78fae4270038eb44fa2720dfd28675d6a Mon Sep 17 00:00:00 2001 From: Loys Ollivier Date: Wed, 3 Jan 2018 17:10:53 +0100 Subject: utils: Verify that callback options are correct v2 '--callback-from' is mandatory but not '--callback-to'. Fix this and allow specifying only 'from' without 'to'. Fixes: 5c6cf2bf9c09 ("utils: Verify that callback options are correct") Change-Id: I0706950cee4ede00cdbe7a3d1ade5500cc568502 Signed-off-by: Loys Ollivier --- utils/create-jobs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/create-jobs.py b/utils/create-jobs.py index e9701a5..f3415a1 100755 --- a/utils/create-jobs.py +++ b/utils/create-jobs.py @@ -50,8 +50,8 @@ def parse_cmdline(machines, tests, rfs_types): args = parser.parse_args() - if (bool(args.callback_from) ^ bool(args.callback_to)): - parser.error("To specify callbacks both '--callback-to' and '--callback-from' are mandatory.") + if args.callback_to and not args.callback_from: + parser.error("When using '--callback-to', '--callback-from' is mandatory.") if (args.url == 'release'): if (args.url_branch is None) and (args.url_version is None): -- cgit 1.2.3-korg