diff options
author | Raoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk> | 2019-03-21 11:55:24 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-21 18:31:26 +0000 |
commit | 8ce43824acef15407e12179e0222fb4cc24811f1 (patch) | |
tree | b85aa7c0a30e783089db97447ba80d7aaa9824f7 | |
parent | 8fb30a60ed68a7dde6fa9f796510cf58aa541cd0 (diff) | |
download | buildstream-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.py | 4 |
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)) |