From: Matías Aguirre Date: Mon, 17 Oct 2011 07:10:59 +0000 (-0200) Subject: Remove debug code. Refs gh-90 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7f7491105b35197b118e7406eff9f0dd99b5eba6;p=django-social-auth.git Remove debug code. Refs gh-90 --- diff --git a/social_auth/backends/__init__.py b/social_auth/backends/__init__.py index 434d24c..5a3e838 100644 --- a/social_auth/backends/__init__.py +++ b/social_auth/backends/__init__.py @@ -133,23 +133,18 @@ class SocialAuthBackend(ModelBackend): 'is_new': False, }) for name in PIPELINE: + mod_name, func_name = name.rsplit('.', 1) try: - mod_name, func_name = name.rsplit('.', 1) - try: - mod = import_module(mod_name) - except ImportError: - print "IMPORT ERROR", mod_name, func_name - logger.exception('Error importing pipeline %s', name) - else: - pipeline = getattr(mod, func_name, None) - if callable(pipeline): - print "CALLABLE", mod_name, func_name - try: - kwargs.update(pipeline(*args, **kwargs) or {}) - except StopPipeline: - break - except Exception, e: - print "EXCEPTION:", str(e) + mod = import_module(mod_name) + except ImportError: + logger.exception('Error importing pipeline %s', name) + else: + pipeline = getattr(mod, func_name, None) + if callable(pipeline): + try: + kwargs.update(pipeline(*args, **kwargs) or {}) + except StopPipeline: + break social_user = kwargs.get('social_user') if social_user: