mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #1673 -- Every database backend now raises ImproperlyConfigured if the relevant Python database module raises ImportError
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0c8ac0972c
commit
8e9833f261
6 changed files with 30 additions and 6 deletions
|
@ -5,7 +5,11 @@ Requires MySQLdb: http://sourceforge.net/projects/mysql-python
|
|||
"""
|
||||
|
||||
from django.db.backends import util
|
||||
import MySQLdb as Database
|
||||
try:
|
||||
import MySQLdb as Database
|
||||
except ImportError, e:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured, "Error loading MySQLdb module: %s" % e
|
||||
from MySQLdb.converters import conversions
|
||||
from MySQLdb.constants import FIELD_TYPE
|
||||
import types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue