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
|
# The backend "mostly works" without this function and there are use
|
||||||
# cases for compiling Python without the sqlite3 libraries (e.g.
|
# cases for compiling Python without the sqlite3 libraries (e.g.
|
||||||
# security hardening).
|
# security hardening).
|
||||||
import _sqlite3
|
import sqlite3
|
||||||
try:
|
try:
|
||||||
value = _sqlite3.adapt(value)
|
value = sqlite3.adapt(value)
|
||||||
except _sqlite3.ProgrammingError:
|
except sqlite3.ProgrammingError:
|
||||||
pass
|
pass
|
||||||
# Manual emulation of SQLite parameter quoting
|
# Manual emulation of SQLite parameter quoting
|
||||||
if isinstance(value, type(True)):
|
if isinstance(value, type(True)):
|
||||||
|
|
Loading…
Reference in New Issue