From 5fd04b0258db6c89cf00c27463e3a6e23353d010 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 30 Aug 2013 17:52:20 +0100 Subject: [PATCH] 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 --- bitbake/lib/prserv/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): try: return self.conn.execute(*query) except sqlite3.OperationalError as exc: - if 'database is locked' in str(exc) and count < 500: + if 'is locked' in str(exc) and count < 500: count = count + 1 continue raise exc