autocommit transactions to sqlite db in python 3.6+

This commit is contained in:
Alan Hamlett 2017-02-16 12:46:04 -08:00
parent 414d3e4312
commit 9c45df622a
6 changed files with 15 additions and 11 deletions

View file

@ -34,7 +34,7 @@ class Queue(object):
return self.db_file
def connect(self):
conn = sqlite3.connect(self.get_db_file())
conn = sqlite3.connect(self.get_db_file(), isolation_level=None)
c = conn.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS {0} (
entity text,

View file

@ -33,7 +33,7 @@ class SessionCache(object):
DB_FILE = os.path.join(os.path.expanduser('~'), '.wakatime.db')
def connect(self):
conn = sqlite3.connect(self.DB_FILE)
conn = sqlite3.connect(self.DB_FILE, isolation_level=None)
c = conn.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS session (
value BLOB)