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:
Chris Larson 2011-02-08 10:41:58 -07:00 committed by Richard Purdie
parent 4af3191331
commit 1385162cd2
1 changed files with 2 additions and 2 deletions

View File

@ -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"""