summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-30 17:52:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-30 17:53:26 +0100
commit5fd04b0258db6c89cf00c27463e3a6e23353d010 (patch)
treeb11da7a33af4c08eb877a5a53bad7dbf01784e51 /bitbake/lib/prserv
parentcb939416b7df27e7410f8084f3622c021e616906 (diff)
downloadpoky-5fd04b0258db6c89cf00c27463e3a6e23353d010.tar.gz
bitbake: prserv: Allow 'table is locked' matching for retry loop
Try and avoid errors like "ERROR: database table is locked: PRMAIN_nohist" by retrying if we see the string "is locked". (Bitbake rev: 1a175b51f80d13f747b653d29e9c0d2201b5109c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/prserv')
-rw-r--r--bitbake/lib/prserv/db.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/prserv/db.py b/bitbake/lib/prserv/db.py
index 7d74327c55..7bc1980099 100644
--- a/bitbake/lib/prserv/db.py
+++ b/bitbake/lib/prserv/db.py
@@ -37,7 +37,7 @@ class PRTable(object):
37 try: 37 try:
38 return self.conn.execute(*query) 38 return self.conn.execute(*query)
39 except sqlite3.OperationalError as exc: 39 except sqlite3.OperationalError as exc:
40 if 'database is locked' in str(exc) and count < 500: 40 if 'is locked' in str(exc) and count < 500:
41 count = count + 1 41 count = count + 1
42 continue 42 continue
43 raise exc 43 raise exc