diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index e37f5a4497..cca3c62252 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -239,7 +239,7 @@ class User(models.Model): app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.') model = models.get_model(app_label, model_name) self._profile_cache = model._default_manager.get(user__id__exact=self.id) - except ImportError, ImproperlyConfigured: + except (ImportError, ImproperlyConfigured): raise SiteProfileNotAvailable return self._profile_cache