use python's sqlite3 if pysqlite > 2.6

users have reported errors about vacuuming in a transaction, which
appear to be due to changed handling of DDL statements
This commit is contained in:
Damien Elmes 2015-09-26 11:51:32 +10:00
parent c243c583d8
commit 713667d015

View File

@ -7,6 +7,10 @@ import time
try:
from pysqlite2 import dbapi2 as sqlite
vi = sqlite.version_info
if vi[0] > 2 or vi[1] > 6:
# latest pysqlite breaks anki
raise ImportError()
except ImportError:
from sqlite3 import dbapi2 as sqlite