Don't allow to run db on different thread

This commit is contained in:
shortcutme 2019-03-18 03:33:28 +01:00
parent 52ac972332
commit 7d6ef195fd
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ class Db(object):
self.log.debug("Created Db path: %s" % self.db_dir)
if not os.path.isfile(self.db_path):
self.log.debug("Db file not exist yet: %s" % self.db_path)
self.conn = sqlite3.connect(self.db_path, check_same_thread=False, isolation_level="DEFERRED")
self.conn = sqlite3.connect(self.db_path, isolation_level="DEFERRED")
self.conn.row_factory = sqlite3.Row
self.conn.set_progress_handler(self.progress, 100000)
self.cur = self.getCursor()