From 68f5d92fb1f5a37800c11aa74ebd56f7f2a43ca5 Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Fri, 12 Apr 2019 10:27:25 +0100 Subject: element.py: Remove redundant fully private __get_build_result() This was being accessed via a local private method that wasn't augmenting the output as such it can be moved. --- buildstream/element.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'buildstream') diff --git a/buildstream/element.py b/buildstream/element.py index d9f32bfc8..17cc9548c 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1056,7 +1056,10 @@ class Element(Plugin): # (str): Detailed description of the result # def _get_build_result(self): - return self.__get_build_result() + if self.__build_result is None: + self.__load_build_result() + + return self.__build_result # __set_build_result(): # @@ -2893,18 +2896,11 @@ class Element(Plugin): self.__build_result = self.__artifact.load_build_result() - def __get_build_result(self): - - if self.__build_result is None: - self.__load_build_result() - - return self.__build_result - def __cached_success(self): if not self._cached(): return False - success, _, _ = self.__get_build_result() + success, _, _ = self._get_build_result() return success def __get_cache_keys_for_commit(self): -- cgit v1.2.1