summaryrefslogtreecommitdiff
path: root/src/buildstream/element.py
diff options
context:
space:
mode:
authorTristan van Berkom <tristan@codethink.co.uk>2020-09-23 13:13:20 +0900
committerTristan van Berkom <tristan@codethink.co.uk>2020-10-27 18:15:54 +0900
commit30f226079b2324af9a0102308a0c223c40999e21 (patch)
treeb3de8e69dee8a9cf66837324380550b568e8c206 /src/buildstream/element.py
parentff7a9579f06c8c06302d005aeea65179c3e1f9f6 (diff)
downloadbuildstream-30f226079b2324af9a0102308a0c223c40999e21.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.
Diffstat (limited to 'src/buildstream/element.py')
-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():
#