From 6335317a423c9533a13d741c673fc45d1f052121 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 13 Jul 2007 05:03:33 +0000 Subject: [PATCH] Fixed #3505 -- Added handling for the error raised when the user forgets the comma in a single element tuple when defining AUTHENTICATION_BACKENDS. Thanks for the help identifying this problem, Mario Gonzalez . git-svn-id: http://code.djangoproject.com/svn/django/trunk@5678 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/auth/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/contrib/auth/__init__.py b/django/contrib/auth/__init__.py index 14ae020674..9813d9a2a2 100644 --- a/django/contrib/auth/__init__.py +++ b/django/contrib/auth/__init__.py @@ -12,6 +12,8 @@ def load_backend(path): mod = __import__(module, {}, {}, [attr]) except ImportError, e: raise ImproperlyConfigured, 'Error importing authentication backend %s: "%s"' % (module, e) + except ValueError, e: + raise ImproperlyConfigured, 'Error importing authentication backends. Is AUTHENTICATION_BACKENDS a correctly defined list or tuple?' try: cls = getattr(mod, attr) except AttributeError: