]> code.ossystems Code Review - openembedded-core.git/commitdiff
persist_data: loop on database lock for table creation
authorChris Larson <chris_larson@mentor.com>
Tue, 8 Feb 2011 17:41:58 +0000 (10:41 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 Feb 2011 22:32:12 +0000 (22:32 +0000)
(Bitbake rev: d93fcbd64ab5d806288424170f55323b4297e7d6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/persist_data.py

index b8c2392945eae819a597deca3ffdda520d8b3702..5fe03223839879700bc8264773daca6ab314da4d 100644 (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"""