summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarius Makovsky <traveltissues@protonmail.com>2019-10-16 17:15:24 +0100
committerDarius Makovsky <traveltissues@protonmail.com>2019-10-16 17:15:24 +0100
commit45f0d52e59910302b936c00f1fc91faff0842819 (patch)
tree542ebda64d71d0597255cd0db613076a739d7f4a
parentd7d602f96b84690222e977f16fc01959d1e97efa (diff)
downloadbuildstream-45f0d52e59910302b936c00f1fc91faff0842819.tar.gz
wip
-rw-r--r--src/buildstream/element.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index c41fa60b1..e19b3f17e 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -1129,12 +1129,14 @@ class Element(Plugin):
# (bool): Whether this element is already present in
# the artifact cache
#
- def _cached(self) -> None:
+ def _cached(self) -> bool:
if not self.__artifact:
self.__cached_successfully = False
- return
+ return False
if self.__artifact_cached():
self.__cached_successfully = True
+ return True
+ return False
# _cached_remotely():
#
@@ -1177,16 +1179,14 @@ class Element(Plugin):
# (bool): Whether this element is already present in
# the artifact cache and the element assembled successfully
#
- def _cached_success(self) -> None:
+ def _cached_success(self) -> bool:
# FIXME: _cache() and _cached_success() should be converted to
# push based functions where we only update __cached_successfully
# once we know this has changed. This will allow us to cheaply check
# __cached_successfully instead of calling _cached_success()
if self.__cached_successfully:
- return
-
- self._cached():
-
+ return True
+ self._cached()
success, _, _ = self._get_build_result()
if success:
self.__cached_successfully = True