From f298121bbc9e31689f3fa79e078e8477d9834173 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Apr 27 2018 05:41:45 +0000 Subject: Update compose status when config validation fails If the config is syntactically correct, but it contains some issues discovered in `validate` method of any phase, we need to raise an exception, not exit immediately. JIRA: COMPOSE-2431 Signed-off-by: Lubomír Sedlář --- diff --git a/bin/pungi-koji b/bin/pungi-koji index 2a62a12..9dd1cd6 100755 --- a/bin/pungi-koji +++ b/bin/pungi-koji @@ -319,7 +319,7 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None): for i in errors: compose.log_error(i) print(i) - sys.exit(1) + raise RuntimeError('Configuration is not valid') # PREP @@ -352,7 +352,7 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None): err_msg = "Cannot load password from file specified by 'signing_key_password_file' option" compose.log_error(err_msg) print(err_msg) - sys.exit(1) + raise RuntimeError(err_msg) if signing_key_password: # Store the password