diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-12-23 10:36:39 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-05 00:58:23 +0000 |
commit | 478677fb624ff6093004a43a2cb9f9ce35cb4e1b (patch) | |
tree | 1f88cd6f6eb26dc6bf95d5b87d551cc76eae15ff /bitbake/lib/bb | |
parent | 2671bb4197a06403e1cd3cedb0f6452046660d0a (diff) | |
download | openembedded-core-478677fb624ff6093004a43a2cb9f9ce35cb4e1b.tar.gz openembedded-core-478677fb624ff6093004a43a2cb9f9ce35cb4e1b.tar.bz2 openembedded-core-478677fb624ff6093004a43a2cb9f9ce35cb4e1b.tar.xz openembedded-core-478677fb624ff6093004a43a2cb9f9ce35cb4e1b.zip |
persist_data: resurrect the lock wait for selects
Think this got inadvertantly dropped when switching to the new API.
(Bitbake rev: 628c5159d1151b89f2b7210c8819489e8dc9a84d)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index 4f87c37f2..b8c239294 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py @@ -64,8 +64,8 @@ class SQLTable(collections.MutableMapping): raise def __getitem__(self, key): - data = self.cursor.execute("SELECT * from %s where key=?;" % - self.table, [key]) + data = self._execute("SELECT * from %s where key=?;" % + self.table, [key]) for row in data: return row[1] @@ -73,7 +73,7 @@ class SQLTable(collections.MutableMapping): self._execute("DELETE from %s where key=?;" % self.table, [key]) def __setitem__(self, key, value): - data = self.cursor.execute("SELECT * from %s where key=?;" % + data = self._execute("SELECT * from %s where key=?;" % self.table, [key]) exists = len(list(data)) if exists: @@ -87,22 +87,22 @@ class SQLTable(collections.MutableMapping): return key in set(self) def __len__(self): - data = self.cursor.execute("SELECT COUNT(key) FROM %s;" % self.table) + data = self._execute("SELECT COUNT(key) FROM %s;" % self.table) for row in data: return row[0] def __iter__(self): - data = self.cursor.execute("SELECT key FROM %s;" % self.table) + data = self._execute("SELECT key FROM %s;" % self.table) for row in data: yield row[0] def iteritems(self): - data = self.cursor.execute("SELECT * FROM %s;" % self.table) + data = self._execute("SELECT * FROM %s;" % self.table) for row in data: yield row[0], row[1] def itervalues(self): - data = self.cursor.execute("SELECT value FROM %s;" % self.table) + data = self._execute("SELECT value FROM %s;" % self.table) for row in data: yield row[0] |