summaryrefslogtreecommitdiff
path: root/ick2/buildsm.py
diff options
context:
space:
mode:
Diffstat (limited to 'ick2/buildsm.py')
-rw-r--r--ick2/buildsm.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ick2/buildsm.py b/ick2/buildsm.py
index 2e6d079..9177e09 100644
--- a/ick2/buildsm.py
+++ b/ick2/buildsm.py
@@ -122,6 +122,7 @@ class BuildStateMachine:
return BUILD_NOTIFYING, (action_id, action)
def mark_action_done(self, event):
+ self.build.resource['exit_code'] = event.exit_code
graph = self.build.get_graph()
graph.set_action_status(event.action_id, ick2.ACTION_DONE)
graph.unblock()
@@ -139,13 +140,15 @@ class BuildStateMachine:
graph.append_action(action, ick2.ACTION_READY, depends=[])
def mark_notification_done(self, event):
+ if event.exit_code not in (0, None): # pragma: no cover
+ self.build.resource['exit_code'] = event.exit_code
graph = self.build.get_graph()
graph.set_action_status(event.action_id, ick2.ACTION_DONE)
graph.unblock()
if graph.has_more_to_do(): # pragma: no cover
return BUILD_NOTIFYING, None
- if self.build.resource.get('exit_code') is None:
+ if self.build.resource.get('exit_code') in (0, None):
self.build.resource['exit_code'] = 0
return BUILD_DONE, None
@@ -206,6 +209,7 @@ class ActionFinishedEvent(BuildEvent):
def __init__(self, action_id):
self.action_id = action_id
+ self.exit_code = 0
class ActionFailedEvent(BuildEvent):