summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan van Berkom <tristan@codethink.co.uk>2020-09-23 13:13:20 +0900
committerJürg Billeter <j@bitron.ch>2020-10-27 10:00:51 +0100
commit0c6bf9518c17d869a44304a00bc5afbdc719396b (patch)
treec9360e158c59b4eeb3f98ec7cd95e821ed63260a
parent33bf4cbf2c0d7f5f0bc3dd7d813cb5d0c66a473a (diff)
downloadbuildstream-0c6bf9518c17d869a44304a00bc5afbdc719396b.tar.gz
element.py: Remove Element._get_brief_display_key()
Now that we have _DisplayKey(), no need for this extra accessor, it's not helping anything to have it anymore.
-rw-r--r--src/buildstream/element.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 9d108c878..9570ad487 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -1021,7 +1021,7 @@ class Element(Plugin):
# Time to use the artifact, check once more that it's there
self.__assert_cached()
- self.status("Staging {}/{}".format(self.name, self._get_brief_display_key()))
+ self.status("Staging {}/{}".format(self.name, self._get_display_key().brief))
# Disable type checking since we can't easily tell mypy that
# `self.__artifact` can't be None at this stage.
files_vdir = self.__artifact.get_files() # type: ignore
@@ -1418,18 +1418,6 @@ class Element(Plugin):
length = min(len(cache_key), context.log_key_length)
return _DisplayKey(cache_key, cache_key[0:length], strict)
- # _get_brief_display_key()
- #
- # Returns an abbreviated cache key for display purposes
- #
- # Returns:
- # (str): An abbreviated hex digest cache key for this Element
- #
- # Question marks are returned if information for the cache key is missing.
- #
- def _get_brief_display_key(self):
- return self._get_display_key().brief
-
# _tracking_done():
#
# This is called in the main process after the element has been tracked
@@ -2701,7 +2689,7 @@ class Element(Plugin):
# Raises an error if the artifact is not cached.
#
def __assert_cached(self):
- assert self._cached(), "{}: Missing artifact {}".format(self, self._get_brief_display_key())
+ assert self._cached(), "{}: Missing artifact {}".format(self, self._get_display_key().brief)
# __get_tainted():
#