mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-29 13:33:44 +03:00
Fix Py3k syntax errors
This commit is contained in:
parent
d4e3610e71
commit
44930f3091
|
@ -185,7 +185,7 @@ class OAuthAuthentication(BaseAuthentication):
|
||||||
try:
|
try:
|
||||||
consumer_key = oauth_request.get_parameter('oauth_consumer_key')
|
consumer_key = oauth_request.get_parameter('oauth_consumer_key')
|
||||||
consumer = oauth_provider_store.get_consumer(request, oauth_request, consumer_key)
|
consumer = oauth_provider_store.get_consumer(request, oauth_request, consumer_key)
|
||||||
except oauth_provider_store.InvalidConsumerError, err:
|
except oauth_provider_store.InvalidConsumerError as err:
|
||||||
raise exceptions.AuthenticationFailed(err)
|
raise exceptions.AuthenticationFailed(err)
|
||||||
|
|
||||||
if consumer.status != oauth_provider.consts.ACCEPTED:
|
if consumer.status != oauth_provider.consts.ACCEPTED:
|
||||||
|
@ -201,8 +201,8 @@ class OAuthAuthentication(BaseAuthentication):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.validate_token(request, consumer, token)
|
self.validate_token(request, consumer, token)
|
||||||
except oauth.Error, e:
|
except oauth.Error as err:
|
||||||
raise exceptions.AuthenticationFailed(e.message)
|
raise exceptions.AuthenticationFailed(err.message)
|
||||||
|
|
||||||
user = token.user
|
user = token.user
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user