app_settings: fix import of ImproperlyConfigured exception
As sys.modules is modified, global imports do not work.
This commit is contained in:
parent
33d305f7a7
commit
66922a5f29
|
@ -1,5 +1,4 @@
|
|||
import sys
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
||||
|
||||
class AppSettings(object):
|
||||
|
@ -40,6 +39,7 @@ class AppSettings(object):
|
|||
try:
|
||||
idps = settings.MELLON_IDENTITY_PROVIDERS
|
||||
except AttributeError:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured('The MELLON_IDENTITY_PROVIDERS setting is mandatory')
|
||||
if isinstance(idps, dict):
|
||||
idps = [idps]
|
||||
|
|
Loading…
Reference in New Issue