element.py: Fix sources() generator to be a generator.
Instead of a function which returns a generator, yield directly
from the ElementSources delegated generator.
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 @@
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)