aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorDanilo Bargen2013-04-30 23:24:20 +0200
committerDanilo Bargen2013-04-30 23:24:33 +0200
commite5040fbf942e021444f629a371bc71c9d47d052f (patch)
tree6b70d59eff1b043685b04585ac4ad756bc59022a /rest_framework/compat.py
parent5d357a9b0807311b97de1e999be588f36fcd5b2f (diff)
downloaddjango-rest-framework-e5040fbf942e021444f629a371bc71c9d47d052f.tar.bz2
Catch ImproperlyConfigured exception in compat.py (fixes #803)
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 067e9018..f8e4e7ca 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -6,6 +6,7 @@ versions of django/python, and compatibility wrappers around optional packages.
from __future__ import unicode_literals
import django
+from django.core.exceptions import ImproperlyConfigured
# Try to import six from Django, fallback to included `six`.
try:
@@ -473,7 +474,7 @@ except ImportError:
try:
import oauth_provider
from oauth_provider.store import store as oauth_provider_store
-except ImportError:
+except (ImportError, ImproperlyConfigured):
oauth_provider = None
oauth_provider_store = None