bitbake: persist_data: Fix py3 update stack overflow

Revision d0f904d407f57998419bd9c305ce53e5eaa36b24 accidentally broke
items() and values() and made them cause stack overflows. Undo that
breakage.

(Bitbake rev: 88c5beca705efa7df4a96fb2aaf3f13c336ac328)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2016-08-10 16:00:33 +01:00
parent 12c8a50c60
commit 82da1e6f6c
1 changed files with 2 additions and 2 deletions

View File

@ -131,14 +131,14 @@ class SQLTable(collections.MutableMapping):
return [row[1] for row in data]
def values(self):
return list(self.values())
return list(self.itervalues())
def itervalues(self):
data = self._execute("SELECT value FROM %s;" % self.table)
return (row[0] for row in data)
def items(self):
return list(self.items())
return list(self.iteritems())
def iteritems(self):
return self._execute("SELECT * FROM %s;" % self.table)