From 1385162cd22d71524e12dc58f48c7d8714d8dc0c Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Tue, 8 Feb 2011 10:41:58 -0700 Subject: persist_data: loop on database lock for table creation (Bitbake rev: d93fcbd64ab5d806288424170f55323b4297e7d6) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/persist_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index b8c239294..5fe032238 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py @@ -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""" -- cgit v1.2.3