persist_data: survive if sqlite3 couldn't enable the shared cache

(Bitbake rev: e870fd57bb84a17a871a5b5de3bf5202fe9b135f)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Christopher Larson 2012-02-16 16:46:20 -07:00 committed by Richard Purdie
parent 52ebd5ff1b
commit f7c0488bd5
1 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,10 @@ if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
logger = logging.getLogger("BitBake.PersistData")
if hasattr(sqlite3, 'enable_shared_cache'):
sqlite3.enable_shared_cache(True)
try:
sqlite3.enable_shared_cache(True)
except sqlite3.OperationalError:
pass
@total_ordering