From 25d0f2f5c35ece407dfc3ccc34a75b00afe34f42 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 29 Mar 2012 20:09:50 -0500 Subject: [PATCH] connect to sqlite with isolation_level=None as an attempt to avoid (invalid) database is locked errors --- Module.py | 2 +- dr.botzo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Module.py b/Module.py index 7835cd3..8808167 100644 --- a/Module.py +++ b/Module.py @@ -174,7 +174,7 @@ class Module(object): """ dbfile = self.config.get('dr.botzo', 'database') - conn = sqlite3.connect(dbfile) + conn = sqlite3.connect(dbfile, isolation_level=None) conn.row_factory = sqlite3.Row # setup regexp function in sqlite diff --git a/dr.botzo.py b/dr.botzo.py index 1c6b016..6caa491 100644 --- a/dr.botzo.py +++ b/dr.botzo.py @@ -60,7 +60,7 @@ try: # make sure we can initialize the database, if such a thing is # called for in the config file dbfile = config.get('dr.botzo', 'database') - conn = sqlite3.connect(dbfile) + conn = sqlite3.connect(dbfile, isolation_level=None) try: query = """ SELECT COUNT(*)