summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-04 17:34:14 -0400
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-05 01:59:34 -0400
commit9db04b3e29ee3e45712f0f7c2917c9032367f850 (patch)
tree18d9ab5abc061e6e3f6f8b2802fbdfbc05719e18
parentb863225f0065da579a35e0b8a63f8e250c30ece5 (diff)
downloadbuildstream-9db04b3e29ee3e45712f0f7c2917c9032367f850.tar.gz
_pipeline.py: Raise pipeline error in pull/push
Instead of trying to fire a MessageType.FAIL without an elapsed parameter, and then not returning from the push()/pull() methods.
-rw-r--r--buildstream/_pipeline.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index 7cba9e169..5f68bd1db 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -645,7 +645,7 @@ class Pipeline():
def pull(self, scheduler, elements):
if not self.artifacts.can_fetch():
- self.message(self.target, MessageType.FAIL, "Not configured for pulling artifacts")
+ raise PipelineError("Not configured for pulling artifacts")
plan = elements
self.assert_consistent(plan)
@@ -683,7 +683,7 @@ class Pipeline():
def push(self, scheduler, elements):
if not self.artifacts.can_push():
- self.message(self.target, MessageType.FAIL, "Not configured for pushing artifacts")
+ raise PipelineError("Not configured for pushing artifacts")
plan = elements
self.assert_consistent(plan)