diff options
| author | Jürg Billeter <j@bitron.ch> | 2018-02-26 20:22:56 +0100 |
|---|---|---|
| committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-02-27 11:43:14 +0000 |
| commit | 3bf19c0ebcbb90ed4bf67ab6fb218688eade32c2 (patch) | |
| tree | 43899098397cee761b9daf75f3ba47b0ab3afe20 | |
| parent | b52ad07c9990b88560bb968cff217f4285a7a622 (diff) | |
| download | buildstream-3bf19c0ebcbb90ed4bf67ab6fb218688eade32c2.tar.gz | |
element.py: Remove unused strength parameter from _cached()
Remove unused strength parameter from _cached() and _remotely_cached(),
which makes them simple accessor functions as `__cached` is equivalent
to `__strong_cached` with a strict build plan.
| -rw-r--r-- | buildstream/element.py | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index d1ec31188..0e928452d 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -809,17 +809,8 @@ class Element(Plugin): # (bool): Whether this element is already present in # the artifact cache # - def _cached(self, strength=None): - - if strength is None: - strength = _KeyStrength.STRONG if self._get_strict() else _KeyStrength.WEAK - - if self.__cached is None: - return False - elif strength == _KeyStrength.STRONG: - return self.__strong_cached - else: - return self.__cached + def _cached(self): + return self.__cached # _assert_cached() # @@ -836,17 +827,8 @@ class Element(Plugin): # (bool): Whether this element is already present in # the remote artifact cache # - def _remotely_cached(self, strength=None): - - if strength is None: - strength = _KeyStrength.STRONG if self._get_strict() else _KeyStrength.WEAK - - if self.__remotely_cached is None: - return False - elif strength == _KeyStrength.STRONG: - return self.__remotely_strong_cached - else: - return self.__remotely_cached + def _remotely_cached(self): + return self.__remotely_cached # _tainted(): # |
