summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-03-20 17:46:01 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-21 12:52:55 +0000
commit90af89909960fd97e480bc684ab392f4147e2591 (patch)
tree1a23e2a71468c93a0b2a97f859779b557d9770a8 /buildstream/element.py
parentbd7e75f99c28fbebedfe8d5db98a922b0e140a62 (diff)
downloadbuildstream-90af89909960fd97e480bc684ab392f4147e2591.tar.gz
plugin.py: make _unique_id accessible to the core
_unique_id is set at instantiation and never modified afterwards. Since the guildelines for the project is to never modify directly an object's state, accessing _unique_id as an attribute is safe. Moreover this will save us some cost of calling functions.
Diffstat (limited to 'buildstream/element.py')
-rw-r--r--buildstream/element.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 35f656fca..3a3eaa236 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1390,7 +1390,7 @@ class Element(Plugin):
for index, source in enumerate(self.__sources):
old_ref = source.get_ref()
new_ref = source._track(self.__sources[0:index])
- refs.append((source._get_unique_id(), new_ref))
+ refs.append((source._unique_id, new_ref))
# Complimentary warning that the new ref will be unused.
if old_ref != new_ref and self._get_workspace():