implements xstatus in graph context, based on node xstatus.

This commit is contained in:
Romain Dorgueil
2018-07-22 11:20:08 +02:00
parent e0d714cbba
commit c449f8601e

View File

@ -148,3 +148,11 @@ class GraphExecutionContext(BaseContext):
def unregister_plugins(self): def unregister_plugins(self):
for plugin_context in self.plugins: for plugin_context in self.plugins:
plugin_context.unregister() 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)