]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Prettify exception handling.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Fri, 3 Jun 2011 21:49:05 +0000 (14:49 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Fri, 3 Jun 2011 21:49:05 +0000 (14:49 -0700)
Display exception type (e.g. "RuntimeError").

Don't re-display the traceback.

teuthology/run_tasks.py

index 8c81845356db0a29e085ab378ca73eb51dbe4eb2..d9b01059b2df41d1ff2ebea1ff56d7fcd0736b34 100644 (file)
@@ -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