mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
4af3191331
commit
1385162cd2
@@ -47,8 +47,8 @@ class SQLTable(collections.MutableMapping):
|
||||
self.cursor = cursor
|
||||
self.table = table
|
||||
|
||||
cursor.execute("CREATE TABLE IF NOT EXISTS %s(key TEXT, value TEXT);"
|
||||
% table)
|
||||
self._execute("CREATE TABLE IF NOT EXISTS %s(key TEXT, value TEXT);"
|
||||
% table)
|
||||
|
||||
def _execute(self, *query):
|
||||
"""Execute a query, waiting to acquire a lock if necessary"""
|
||||
|
||||
Reference in New Issue
Block a user