From b37fe7b72a6b6b2ba63eb4f8761c91975344a14e Mon Sep 17 00:00:00 2001 From: Miikka Koistinen Date: Wed, 30 May 2018 10:09:34 +0300 Subject: Make exit status a constant in run.py JIRA: DOVETAIL-625 Change-Id: Ib96e6e39bad708f495af97ed43884909e394da10 Signed-off-by: Miikka Koistinen --- dovetail/run.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dovetail/run.py b/dovetail/run.py index 348c3915..25e00626 100755 --- a/dovetail/run.py +++ b/dovetail/run.py @@ -85,12 +85,12 @@ def validate_input(input_dict, check_dict, logger): logger.error("The input option 'functest_tag' can't be '{}', " "valid values are {}.".format(func_tag, valid_functest_tags)) - raise SystemExit(1) + raise SystemExit(EXIT_RUN_FAILED) if yard_tag is not None and yard_tag not in valid_yardstick_tags: logger.error("The input option 'yardstick_tag' can't be '{}', " "valid values are {}.".format(yard_tag, valid_yardstick_tags)) - raise SystemExit(1) + raise SystemExit(EXIT_RUN_FAILED) # if bott_tag is not None and bott_tag not in valid_tag: # logger.error("The input option 'bott_tag' can't be {}, " # "valid values are {}.".format(bott_tag, valid_tag)) @@ -123,7 +123,7 @@ def filter_config(input_dict, logger): break except KeyError as e: logger.exception('KeyError {}.'.format(e)) - raise SystemExit(1) + raise SystemExit(EXIT_RUN_FAILED) if not configs: return None return configs @@ -155,7 +155,7 @@ def clean_results_dir(): dt_utils.exec_cmd(cmd, exit_on_error=False, exec_msg_on=False) else: print "result_dir in dovetail_config.yml is not a directory." - raise SystemExit(1) + raise SystemExit(EXIT_RUN_FAILED) def get_result_path(): -- cgit 1.2.3-korg