Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #9113 -- Improved exception message reporting when importing sq…

…lite3 fails.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e99cd487691f5518e7dcd4207319b2402e9f1024 1 parent 168c776
@malcolmt malcolmt authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 django/db/backends/sqlite3/base.py
View
7 django/db/backends/sqlite3/base.py
@@ -14,16 +14,17 @@
try:
try:
from sqlite3 import dbapi2 as Database
- except ImportError:
+ except ImportError, e1:
from pysqlite2 import dbapi2 as Database
-except ImportError, e:
+except ImportError, exc:
import sys
from django.core.exceptions import ImproperlyConfigured
if sys.version_info < (2, 5, 0):
module = 'pysqlite2'
else:
module = 'sqlite3'
- raise ImproperlyConfigured, "Error loading %s module: %s" % (module, e)
+ exc = e1
+ raise ImproperlyConfigured, "Error loading %s module: %s" % (module, exc)
try:
import decimal

0 comments on commit e99cd48

Please sign in to comment.
Something went wrong with that request. Please try again.