Skip to content

Commit

Permalink
commit before turning off synchronous
Browse files Browse the repository at this point in the history
otherwise python 3.6 fails with
sqlite3.OperationalError: Safety level may not be changed inside a transaction
(fixes issue piskvorky#58)
  • Loading branch information
bit authored Jan 7, 2017
1 parent 4eb2051 commit bc1de9a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sqlitedict.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ def run(self):
conn.execute('PRAGMA journal_mode = %s' % self.journal_mode)
conn.text_factory = str
cursor = conn.cursor()
conn.commit()
cursor.execute('PRAGMA synchronous=OFF')

res = None
Expand Down

0 comments on commit bc1de9a

Please sign in to comment.