diff options
| author | Sagar Mittal <sagar@sagarmittal.com> | 2015-06-05 12:47:17 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-06 11:35:02 -0400 |
| commit | e5033dcbba4f040feae546345b0760efe7a46fb6 (patch) | |
| tree | a6c40fa9d9cf68bc90cb2c0c7b1e029f96ce122d | |
| parent | bc77eb6d0858652e197c08c299efaeb06c51efee (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.py | 6 |
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)): |
