From 3a2176fe7383278503dcf732d98e10c520b29935 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Thu, 18 Nov 2010 10:54:10 -0700 Subject: persist_data: handle locked db for SELECT Parallel processes interacting with the persist_data db can quite easily explode without this. (Bitbake rev: b3d5432cff0ff28f4c8a5bcf10efa3e383b4fd4d) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/persist_data.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index 17975b64a..76bff1665 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py @@ -127,9 +127,7 @@ class PersistData: count = 0 while True: try: - ret = self.cursor.execute(*query) - #print "Had to retry %s times" % count - return ret + return self.cursor.execute(*query) except sqlite3.OperationalError as e: if 'database is locked' in str(e) and count < 500: count = count + 1 -- cgit v1.2.3