diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-11-18 10:54:10 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:39 +0000 |
commit | 3a2176fe7383278503dcf732d98e10c520b29935 (patch) | |
tree | f676d8e8a78397507bb3929b6487b8706414623e /bitbake/lib/bb/persist_data.py | |
parent | f56525836847fbba9096d795f9b396637d1e80a9 (diff) | |
download | poky-3a2176fe7383278503dcf732d98e10c520b29935.tar.gz |
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 <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/persist_data.py')
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index 17975b64a5..76bff16658 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py | |||
@@ -127,9 +127,7 @@ class PersistData: | |||
127 | count = 0 | 127 | count = 0 |
128 | while True: | 128 | while True: |
129 | try: | 129 | try: |
130 | ret = self.cursor.execute(*query) | 130 | return self.cursor.execute(*query) |
131 | #print "Had to retry %s times" % count | ||
132 | return ret | ||
133 | except sqlite3.OperationalError as e: | 131 | except sqlite3.OperationalError as e: |
134 | if 'database is locked' in str(e) and count < 500: | 132 | if 'database is locked' in str(e) and count < 500: |
135 | count = count + 1 | 133 | count = count + 1 |