Skip to content

Commit dde8ebf

Browse files
committed
Better imports
Narrowed down the scope of the imports, after checking out compat.py as suggested, testsuite is happy.
1 parent f245e8e commit dde8ebf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

oauth2_provider/oauth2_validators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import base64
44
try:
5-
import urllib.parse as urllib
5+
from urllib.parse import unquote_plus
66
except ImportError:
7-
import urllib
7+
from urllib import unquote_plus
88
import logging
99
from datetime import timedelta
1010

@@ -48,7 +48,7 @@ def _authenticate_basic_auth(self, request):
4848
client_id, client_secret = auth_string_decoded.split(':', 1)
4949

5050
try:
51-
request.client = Application.objects.get(client_id=urllib.unquote_plus(client_id), client_secret=urllib.unquote_plus(client_secret))
51+
request.client = Application.objects.get(client_id=unquote_plus(client_id), client_secret=unquote_plus(client_secret))
5252
return True
5353

5454
except Application.DoesNotExist:

0 commit comments

Comments
 (0)