Django

Code

Changeset 7358

Show
Ignore:
Timestamp:
03/24/08 09:02:44 (4 months ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/backends/mysql/base.py

    r7131 r7358  
    1818if (version < (1,2,1) or (version[:3] == (1, 2, 1) and 
    1919        (len(version) < 5 or version[3] != 'final' or version[4] < 2))): 
    20     raise ImportError("MySQLdb-1.2.1p2 or newer is required; you have %s" % Database.__version__) 
     20    from django.core.exceptions import ImproperlyConfigured 
     21    raise ImproperlyConfigured("MySQLdb-1.2.1p2 or newer is required; you have %s" % Database.__version__) 
    2122 
    2223from MySQLdb.converters import conversions