summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/element.py')
-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))