Imported sqlite3 instead of _sqlite3
adapt and ProgrammingError are both available on the sqlite3 module. There's no need to import the internal _sqlite3 module.
This commit is contained in:
parent
bc77eb6d08
commit
e5033dcbba
|
@ -36,10 +36,10 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
|||
# The backend "mostly works" without this function and there are use
|
||||
# cases for compiling Python without the sqlite3 libraries (e.g.
|
||||
# security hardening).
|
||||
import _sqlite3
|
||||
import sqlite3
|
||||
try:
|
||||
value = _sqlite3.adapt(value)
|
||||
except _sqlite3.ProgrammingError:
|
||||
value = sqlite3.adapt(value)
|
||||
except sqlite3.ProgrammingError:
|
||||
pass
|
||||
# Manual emulation of SQLite parameter quoting
|
||||
if isinstance(value, type(True)):
|
||||
|
|
Loading…
Reference in New Issue