mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
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:
parent
c243c583d8
commit
713667d015
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue