aboutsummaryrefslogtreecommitdiffstats
path: root/utils/create-jobs.py
diff options
context:
space:
mode:
authorLoys Ollivier <lollivier@baylibre.com>2017-12-27 13:59:42 +0100
committerLoys Ollivier <lollivier@baylibre.com>2017-12-27 14:18:08 +0100
commit5c6cf2bf9c09f379cca28947fe6af0ec413c1fc4 (patch)
tree256b7f8c56bd41ec982e600ff90a7584cf6e06b6 /utils/create-jobs.py
parent17a84303e0529c121d730d60ab282dd158fbaf34 (diff)
utils: Verify that callback options are correct
When using callbacks, the user must specify '--callback-to' and '--callback-from'. Make these two arguments mutually dependant. If one is specified, the other becomes mandatory as well. Edit exceptions returns so they give meaningful information to the user in case something went wrong while reading from the callback configuration file. Change-Id: Iaa0de0b6f01ba605407db2f37c3da97aa0cacbc2 Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
Diffstat (limited to 'utils/create-jobs.py')
-rwxr-xr-xutils/create-jobs.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/create-jobs.py b/utils/create-jobs.py
index 5a146c4..83ee922 100755
--- a/utils/create-jobs.py
+++ b/utils/create-jobs.py
@@ -49,6 +49,9 @@ 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.url == 'release'):
if (args.url_branch is None) and (args.url_version is None):
args.url = 'default'