From: Matías Aguirre Date: Wed, 23 Feb 2011 23:39:17 +0000 (-0200) Subject: Catch TypeError on int() X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d0c0646fabafb4b00e9f9f49e7865cff55058fc3;p=django-social-auth.git Catch TypeError on int() --- diff --git a/social_auth/models.py b/social_auth/models.py index 4a2c529..020f158 100644 --- a/social_auth/models.py +++ b/social_auth/models.py @@ -58,7 +58,7 @@ class UserSocialAuth(models.Model): name = getattr(settings, 'SOCIAL_AUTH_EXPIRATION', 'expires') try: return timedelta(seconds=int(self.extra_data.get(name))) - except ValueError: + except (ValueError, TypeError): pass return None