From f298121bbc9e31689f3fa79e078e8477d9834173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 26 Apr 2018 14:09:26 +0200 Subject: [PATCH] Update compose status when config validation fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ář --- bin/pungi-koji | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pungi-koji b/bin/pungi-koji index 2a62a125..9dd1cd65 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