From 3904b74a3f2f92fefe1d39281ed683c52f2fef03 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 28 Apr 2012 18:09:37 +0200 Subject: 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). --- django/core/cache/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/core/cache') diff --git a/django/core/cache/__init__.py b/django/core/cache/__init__.py index 8f07f13d3a..2a9e1a700b 100644 --- a/django/core/cache/__init__.py +++ b/django/core/cache/__init__.py @@ -128,7 +128,7 @@ def get_cache(backend, **kwargs): mod_path, cls_name = backend.rsplit('.', 1) mod = importlib.import_module(mod_path) backend_cls = getattr(mod, cls_name) - except (AttributeError, ImportError), e: + except (AttributeError, ImportError) as e: raise InvalidCacheBackendError( "Could not find backend '%s': %s" % (backend, e)) cache = backend_cls(location, params) -- cgit v1.3