diff options
author | Jürg Billeter <j@bitron.ch> | 2017-07-18 11:26:42 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-07-20 07:24:56 +0200 |
commit | 20392aa3fa0a21b6b559f0f7c65c4b07f27d3ca4 (patch) | |
tree | c779bcc51c780add938b6990f97550c213bb45dd | |
parent | 9f6f1034c160d20249f0710a804ca67bcd091a23 (diff) | |
download | buildstream-20392aa3fa0a21b6b559f0f7c65c4b07f27d3ca4.tar.gz |
element.py: Consider pull failure fatal
Build planning uses list of artifacts in remote artifact cache. Pull
failures cannot be ignored.
-rw-r--r-- | buildstream/element.py | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index 81f4a1626..dbdc090cf 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1112,29 +1112,12 @@ class Element(Plugin): def progress(percent, message): self.status(message) - # Avoid sending failure messages by not using a timed activity - # here, in any case the overall activity is timed by the PullQueue - # in the scheduler. - # - # Instead just issue an info message about whether an artifact - # was available or not. - try: - self.__artifacts.pull(self, progress=progress) - - # Notify successfull download - display_key = self._get_display_key() - self.info("Downloaded artifact {}".format(display_key)) - downloaded = True - except _ArtifactError: - # Just return false, so that the frontend knows that - # the artifact was not downloaded - # - # FIXME: Ideally we would want to raise an exception here if there - # was an error, but just return False if there was no error - # an no artifact was available to download - downloaded = False + self.__artifacts.pull(self, progress=progress) - return downloaded + # Notify successfull download + display_key = self._get_display_key() + self.info("Downloaded artifact {}".format(display_key)) + return True # _push(): # |