Fix xstatus when graph is empty.
This commit is contained in:
@ -149,10 +149,10 @@ class GraphExecutionContext(BaseContext):
|
|||||||
for plugin_context in self.plugins:
|
for plugin_context in self.plugins:
|
||||||
plugin_context.unregister()
|
plugin_context.unregister()
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def xstatus(self):
|
def xstatus(self):
|
||||||
"""
|
"""
|
||||||
UNIX-like exit status, only coherent if the context has stopped.
|
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
|
||||||
|
|||||||
@ -302,9 +302,8 @@ class NodeExecutionContext(BaseContext, WithStatistics):
|
|||||||
input_bag = self._input_type(*input_bag)
|
input_bag = self._input_type(*input_bag)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise UnrecoverableTypeError(
|
raise UnrecoverableTypeError(
|
||||||
'Input type changed to incompatible type between calls to {!r}.\nGot {!r} which is not of type {!r}.'.format(
|
'Input type changed to incompatible type between calls to {!r}.\nGot {!r} which is not of type {!r}.'.
|
||||||
self.wrapped, input_bag, self._input_type
|
format(self.wrapped, input_bag, self._input_type)
|
||||||
)
|
|
||||||
) from exc
|
) from exc
|
||||||
|
|
||||||
# Store or check input length, which is a soft fallback in case we're just using tuples
|
# Store or check input length, which is a soft fallback in case we're just using tuples
|
||||||
|
|||||||
Reference in New Issue
Block a user