aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorTom Christie2013-04-03 04:48:46 -0700
committerTom Christie2013-04-03 04:48:46 -0700
commitcb2021617305887c40f2cdc9943b208d035402cb (patch)
tree8f197faa1d2f2435cbbe4aa75c0183ab7748e4c4 /rest_framework
parenta18d3df0f60ac4d5ad981b2d463f8408b44286ff (diff)
parent80d28de03477a8dab3832707ca4489c4b2e78e5d (diff)
downloaddjango-rest-framework-cb2021617305887c40f2cdc9943b208d035402cb.tar.bz2
Merge pull request #776 from atlefren/master
Proper import of errors from oauth_provider
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/authentication.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py
index 3e7e89e8..1eebb5b9 100644
--- a/rest_framework/authentication.py
+++ b/rest_framework/authentication.py
@@ -230,7 +230,7 @@ class OAuthAuthentication(BaseAuthentication):
try:
consumer_key = oauth_request.get_parameter('oauth_consumer_key')
consumer = oauth_provider_store.get_consumer(request, oauth_request, consumer_key)
- except oauth_provider_store.InvalidConsumerError as err:
+ except oauth_provider.store.InvalidConsumerError as err:
raise exceptions.AuthenticationFailed(err)
if consumer.status != oauth_provider.consts.ACCEPTED:
@@ -240,7 +240,7 @@ class OAuthAuthentication(BaseAuthentication):
try:
token_param = oauth_request.get_parameter('oauth_token')
token = oauth_provider_store.get_access_token(request, oauth_request, consumer, token_param)
- except oauth_provider_store.InvalidTokenError:
+ except oauth_provider.store.InvalidTokenError:
msg = 'Invalid access token: %s' % oauth_request.get_parameter('oauth_token')
raise exceptions.AuthenticationFailed(msg)