From 50c4b312a27b61725885ee84d45a0f07f94a8ec6 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Wed, 30 Nov 2011 17:07:26 -0800 Subject: [PATCH] Handle interactive-on-error also when error is from contextmanager exit. Closes: http://tracker.newdream.net/issues/1745 --- teuthology/run_tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/run_tasks.py b/teuthology/run_tasks.py index 446493d703808..d121bd4821c1f 100644 --- a/teuthology/run_tasks.py +++ b/teuthology/run_tasks.py @@ -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() -- 2.39.5