mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
bitbake: tinfoil: Add iterator support for DataStoreConnector
Some usages need to iterate the datastore. This is slow and not recommended but support this. (Bitbake rev: 38b4e330c6c2007e8ead878e1d9e9580d3b19c7b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -104,6 +104,11 @@ class TinfoilDataStoreConnector:
|
||||
setattr(self, name, newfunc)
|
||||
return newfunc
|
||||
|
||||
def __iter__(self):
|
||||
keys = self.tinfoil.run_command('dataStoreConnectorCmd', self.dsindex, "keys", [], {})
|
||||
for k in keys:
|
||||
yield k
|
||||
|
||||
class TinfoilCookerAdapter:
|
||||
"""
|
||||
Provide an adapter for existing code that expects to access a cooker object via Tinfoil,
|
||||
|
||||
Reference in New Issue
Block a user