summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk>2019-03-21 11:55:24 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-21 18:31:26 +0000
commit8ce43824acef15407e12179e0222fb4cc24811f1 (patch)
treeb85aa7c0a30e783089db97447ba80d7aaa9824f7
parent8fb30a60ed68a7dde6fa9f796510cf58aa541cd0 (diff)
downloadbuildstream-8ce43824acef15407e12179e0222fb4cc24811f1.tar.gz
element.py: remove reduntant list(self.sources())
In element we have access to self.__sources directly so we should use that. Part of fixes for !1214
-rw-r--r--buildstream/element.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 03b7690ec..438a77a13 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1502,11 +1502,11 @@ class Element(Plugin):
# Ensure sources are cached
self.__cache_sources()
- if list(self.sources()):
+ if self.__sources:
sourcecache = self._get_context().sourcecache
try:
- import_dir = sourcecache.export(list(self.sources())[-1])
+ import_dir = sourcecache.export(self.__sources[-1])
except SourceCacheError as e:
raise ElementError("Error trying to export source for {}: {}"
.format(self.name, e))