connect to sqlite with isolation_level=None as an attempt to avoid (invalid) database is locked errors
This commit is contained in:
parent
07744a0f66
commit
25d0f2f5c3
@ -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
|
||||
|
@ -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(*)
|
||||
|
Loading…
Reference in New Issue
Block a user