summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSagar Mittal <sagar@sagarmittal.com>2015-06-05 12:47:17 -0700
committerTim Graham <timograham@gmail.com>2015-06-06 11:35:02 -0400
commite5033dcbba4f040feae546345b0760efe7a46fb6 (patch)
treea6c40fa9d9cf68bc90cb2c0c7b1e029f96ce122d
parentbc77eb6d0858652e197c08c299efaeb06c51efee (diff)
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.
-rw-r--r--django/db/backends/sqlite3/schema.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py
index 51c58a0330..1ac11239f0 100644
--- a/django/db/backends/sqlite3/schema.py
+++ b/django/db/backends/sqlite3/schema.py
@@ -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)):