diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-02-08 10:41:58 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-10 22:32:12 +0000 |
commit | 1385162cd22d71524e12dc58f48c7d8714d8dc0c (patch) | |
tree | 3c5906f41abb92d022fe7faf8f17581f12abe0e3 /bitbake/lib/bb/persist_data.py | |
parent | 4af31913318318739efc5e10b6dc3a84477458bd (diff) | |
download | poky-1385162cd22d71524e12dc58f48c7d8714d8dc0c.tar.gz |
persist_data: loop on database lock for table creation
(Bitbake rev: d93fcbd64ab5d806288424170f55323b4297e7d6)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/persist_data.py')
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index b8c2392945..5fe0322383 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py | |||
@@ -47,8 +47,8 @@ class SQLTable(collections.MutableMapping): | |||
47 | self.cursor = cursor | 47 | self.cursor = cursor |
48 | self.table = table | 48 | self.table = table |
49 | 49 | ||
50 | cursor.execute("CREATE TABLE IF NOT EXISTS %s(key TEXT, value TEXT);" | 50 | self._execute("CREATE TABLE IF NOT EXISTS %s(key TEXT, value TEXT);" |
51 | % table) | 51 | % table) |
52 | 52 | ||
53 | def _execute(self, *query): | 53 | def _execute(self, *query): |
54 | """Execute a query, waiting to acquire a lock if necessary""" | 54 | """Execute a query, waiting to acquire a lock if necessary""" |