]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Handle interactive-on-error also when error is from contextmanager exit.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Thu, 1 Dec 2011 01:07:26 +0000 (17:07 -0800)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Thu, 1 Dec 2011 01:07:26 +0000 (17:07 -0800)
Closes: http://tracker.newdream.net/issues/1745
teuthology/run_tasks.py

index 446493d703808c34c3499851c6ae5737e447f9c2..d121bd4821c1f10a295925c80f2dc55bbb9c4896 100644 (file)
@@ -53,6 +53,11 @@ def run_tasks(tasks, ctx):
                         # if first failure is in an __exit__, we don't
                         # have exc_info set yet
                         exc_info = sys.exc_info()
+
+                    if ctx.config.get('interactive-on-error'):
+                        from .task import interactive
+                        log.warning('Saw failure, going into interactive mode...')
+                        interactive.task(ctx=ctx, config=None)
                 else:
                     if suppress:
                         sys.exc_clear()