You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:01:14 UTC
[buildstream] 01/01: element.py: Fix sources() generator to be a
generator.
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch tristan/fix-sources-generator
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 89c27fd1cc6f9efb6491419d0dfe98ae10d8ec0e
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Mon Aug 24 16:53:27 2020 +0900
element.py: Fix sources() generator to be a generator.
Instead of a function which returns a generator, yield directly
from the ElementSources delegated generator.
---
src/buildstream/element.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 4a29fd8..a748cba 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -415,7 +415,7 @@ class Element(Plugin):
Yields:
The sources of this element
"""
- return self.__sources.sources()
+ yield from self.__sources.sources()
def dependencies(self, scope: Scope, *, recurse: bool = True, visited=None) -> Iterator["Element"]:
"""dependencies(scope, *, recurse=True)