diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-04-28 18:09:37 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-04-29 20:57:15 +0200 |
| commit | 3904b74a3f2f92fefe1d39281ed683c52f2fef03 (patch) | |
| tree | 1ae8f65371ed53df205553f41c9d0f90d1e9fee9 /django/db/utils.py | |
| parent | eefb00f30124f775ca52258ccd8549054fe8230f (diff) | |
Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
Diffstat (limited to 'django/db/utils.py')
| -rw-r--r-- | django/db/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/utils.py b/django/db/utils.py index 3f5b86ee12..2b6ae2cf2e 100644 --- a/django/db/utils.py +++ b/django/db/utils.py @@ -22,7 +22,7 @@ def load_backend(backend_name): # Look for a fully qualified database backend name try: return import_module('.base', backend_name) - except ImportError, e_user: + except ImportError as e_user: # The database backend wasn't found. Display a helpful error message # listing all possible (built-in) database backends. backend_dir = os.path.join(os.path.dirname(__file__), 'backends') @@ -112,7 +112,7 @@ class ConnectionRouter(object): try: module_name, klass_name = r.rsplit('.', 1) module = import_module(module_name) - except ImportError, e: + except ImportError as e: raise ImproperlyConfigured('Error importing database router %s: "%s"' % (klass_name, e)) try: router_class = getattr(module, klass_name) |
