Fix xstatus when graph is empty.
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user