Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2475c35

Browse files
authored
Merge pull request auth0#72 from auth0/Fix-logout-python27
Support python 2.7
2 parents 0ae920e + b8e5b35 commit 2475c35

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

auth0/v3/authentication/logout.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from .base import AuthenticationBase
2-
from urllib.parse import quote_plus
2+
try:
3+
from urllib.parse import quote_plus
4+
except ImportError:
5+
from urllib import quote_plus
36

47

58
class Logout(AuthenticationBase):
@@ -31,7 +34,8 @@ def logout(self, client_id, return_to, federated=False):
3134

3235
if federated is True:
3336
return self.get(
34-
'https://%s/v2/logout?federated&client_id=%s&returnTo=%s' % (self.domain, client_id, return_to),
37+
'https://%s/v2/logout?federated&client_id=%s&returnTo=%s' % (self.domain, client_id,
38+
return_to),
3539
headers={'Content-Type': 'application/json'}
3640
)
3741
return self.get(

0 commit comments

Comments
 (0)