diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-24 14:02:44 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-24 14:02:44 +0000 |
| commit | 89e7b673d836b6aa1a9586c1319c86ba7b7ea262 (patch) | |
| tree | 9828b8cd754b8af1d97ad6b9b48ba47f8de45e6a | |
| parent | a9a70bfe555676226b075003805f4517ac1bac9a (diff) | |
Fixed #5531 -- Changes a while back meant we are handling import errors from
database backends differently now. Which meant the MySQLdb version check was
being swallowed. Changed the exception type to ensure this is percolated
correctly. Patch from Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/backends/mysql/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 697dcd3a67..7782387f41 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -17,7 +17,8 @@ except ImportError, e: version = Database.version_info if (version < (1,2,1) or (version[:3] == (1, 2, 1) and (len(version) < 5 or version[3] != 'final' or version[4] < 2))): - raise ImportError("MySQLdb-1.2.1p2 or newer is required; you have %s" % Database.__version__) + from django.core.exceptions import ImproperlyConfigured + raise ImproperlyConfigured("MySQLdb-1.2.1p2 or newer is required; you have %s" % Database.__version__) from MySQLdb.converters import conversions from MySQLdb.constants import FIELD_TYPE |
