From 7f393379c1674f8dd4cb6ab18d5a52980c5325b2 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Fri, 3 Jun 2011 14:49:05 -0700 Subject: [PATCH] Prettify exception handling. Display exception type (e.g. "RuntimeError"). Don't re-display the traceback. --- teuthology/run_tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/run_tasks.py b/teuthology/run_tasks.py index 8c81845356..d9b01059b2 100644 --- a/teuthology/run_tasks.py +++ b/teuthology/run_tasks.py @@ -40,8 +40,8 @@ def run_tasks(tasks, ctx): exc_info = (None, None, None) if exc_info != (None, None, None): - log.debug('Exception was not quenched, raising %s', exc_info[1]) - raise exc_info[0], exc_info[1], exc_info[2] + log.debug('Exception was not quenched, exiting: %s: %s', exc_info[0].__name__, exc_info[1]) + raise SystemExit(1) finally: # be careful about cyclic references del exc_info -- 2.39.5