Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #5531 -- Changes a while back meant we are handling import erro…

…rs 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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 89e7b673d836b6aa1a9586c1319c86ba7b7ea262 1 parent a9a70bf
@malcolmt malcolmt authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/db/backends/mysql/
3  django/db/backends/mysql/
@@ -17,7 +17,8 @@
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
Please sign in to comment.
Something went wrong with that request. Please try again.