From: Matías Aguirre Date: Fri, 9 Sep 2011 00:54:12 +0000 (-0300) Subject: Leave exception handling to decorator X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=eb88d6a3b07d00fa97ad3c811725c1e66ac72ef6;p=django-social-auth.git Leave exception handling to decorator --- diff --git a/social_auth/views.py b/social_auth/views.py index d084fb8..ed9237a 100644 --- a/social_auth/views.py +++ b/social_auth/views.py @@ -183,11 +183,4 @@ def auth_complete(request, backend, user=None): """Complete auth process. Return authenticated user or None.""" if user and not user.is_authenticated(): user = None - - try: - user = backend.auth_complete(user=user) - except ValueError, e: # some Authentication error ocurred - error_key = getattr(settings, 'SOCIAL_AUTH_ERROR_KEY', None) - if error_key: # store error in session - request.session[error_key] = str(e) - return user + return backend.auth_complete(user=user)