From afd2d3ae66030b81b1ceb95589e8204216f4bb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 27 Feb 2019 09:56:29 +0100 Subject: [PATCH] orchestrator: Log exception to log file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This data can be useful for debugging. JIRA: COMPOSE-3284 Signed-off-by: Lubomír Sedlář --- pungi_utils/orchestrator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pungi_utils/orchestrator.py b/pungi_utils/orchestrator.py index b94ddc46..6940014f 100644 --- a/pungi_utils/orchestrator.py +++ b/pungi_utils/orchestrator.py @@ -544,5 +544,9 @@ def main(argv=None): main_config_file = os.path.abspath(args.config) with temp_dir() as work_dir: - if not run(work_dir, main_config_file, args): + try: + if not run(work_dir, main_config_file, args): + sys.exit(1) + except Exception: + log.exception("Unhandled exception!") sys.exit(1)