Skip to content

Commit 198b679

Browse files
Merge pull request encode#804 from dbrgn/iss803
Catch ImproperlyConfigured exception in compat.py
2 parents 5d357a9 + e5040fb commit 198b679

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_framework/compat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from __future__ import unicode_literals
77

88
import django
9+
from django.core.exceptions import ImproperlyConfigured
910

1011
# Try to import six from Django, fallback to included `six`.
1112
try:
@@ -473,7 +474,7 @@ def apply_markdown(text):
473474
try:
474475
import oauth_provider
475476
from oauth_provider.store import store as oauth_provider_store
476-
except ImportError:
477+
except (ImportError, ImproperlyConfigured):
477478
oauth_provider = None
478479
oauth_provider_store = None
479480

0 commit comments

Comments
 (0)