Merge pull request #804 from dbrgn/iss803

Catch ImproperlyConfigured exception in compat.py
This commit is contained in:
Tom Christie 2013-05-01 09:54:07 -07:00
commit 198b679e02

View File

@ -6,6 +6,7 @@ versions of django/python, and compatibility wrappers around optional packages.
from __future__ import unicode_literals from __future__ import unicode_literals
import django import django
from django.core.exceptions import ImproperlyConfigured
# Try to import six from Django, fallback to included `six`. # Try to import six from Django, fallback to included `six`.
try: try:
@ -473,7 +474,7 @@ except ImportError:
try: try:
import oauth_provider import oauth_provider
from oauth_provider.store import store as oauth_provider_store from oauth_provider.store import store as oauth_provider_store
except ImportError: except (ImportError, ImproperlyConfigured):
oauth_provider = None oauth_provider = None
oauth_provider_store = None oauth_provider_store = None