diff --git a/bonobo/execution/base.py b/bonobo/execution/base.py index 85666ac..e1b9bb0 100644 --- a/bonobo/execution/base.py +++ b/bonobo/execution/base.py @@ -81,10 +81,12 @@ class LoopingExecutionContext(Wrapper): if self._stopped: return - self._stopped = True + try: + with unrecoverable(self.handle_error): + self._stack.teardown() + finally: + self._stopped = True - with unrecoverable(self.handle_error): - self._stack.teardown() def handle_error(self, exc, trace): return print_error(exc, trace, context=self.wrapped) diff --git a/bonobo/execution/node.py b/bonobo/execution/node.py index 5969edd..02a866e 100644 --- a/bonobo/execution/node.py +++ b/bonobo/execution/node.py @@ -22,7 +22,7 @@ class NodeExecutionContext(WithStatistics, LoopingExecutionContext): @property def alive(self): """todo check if this is right, and where it is used""" - return self.input.alive and self._started and not self._stopped + return self._started and not self._stopped @property def alive_str(self):