diff --git a/bonobo/execution/contexts/graph.py b/bonobo/execution/contexts/graph.py index 2828592..ffc9dcc 100644 --- a/bonobo/execution/contexts/graph.py +++ b/bonobo/execution/contexts/graph.py @@ -149,10 +149,10 @@ class GraphExecutionContext(BaseContext): for plugin_context in self.plugins: plugin_context.unregister() - @property def xstatus(self): """ UNIX-like exit status, only coherent if the context has stopped. + """ - return max(node.xstatus for node in self.nodes) + return max(node.xstatus for node in self.nodes) if len(self.nodes) else 0 diff --git a/bonobo/execution/contexts/node.py b/bonobo/execution/contexts/node.py index b5884a7..44476f0 100644 --- a/bonobo/execution/contexts/node.py +++ b/bonobo/execution/contexts/node.py @@ -302,9 +302,8 @@ class NodeExecutionContext(BaseContext, WithStatistics): input_bag = self._input_type(*input_bag) except Exception as exc: raise UnrecoverableTypeError( - 'Input type changed to incompatible type between calls to {!r}.\nGot {!r} which is not of type {!r}.'.format( - self.wrapped, input_bag, self._input_type - ) + 'Input type changed to incompatible type between calls to {!r}.\nGot {!r} which is not of type {!r}.'. + format(self.wrapped, input_bag, self._input_type) ) from exc # Store or check input length, which is a soft fallback in case we're just using tuples