Kaydet (Commit) e5033dcb authored tarafından Sagar Mittal's avatar Sagar Mittal Kaydeden (comit) Tim Graham

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.
üst bc77eb6d
...@@ -36,10 +36,10 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): ...@@ -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)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment