Skip to content

Commit bbe01b0

Browse files
committed
cosmetics
1 parent c58db08 commit bbe01b0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

oauth2_provider/views/mixins.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,8 @@ def error_response(self, error, **kwargs):
156156
"""
157157
oauthlib_error = error.oauthlib_error
158158

159-
separator = '?'
160-
try:
161-
if '?' in oauthlib_error.redirect_uri:
162-
separator = '&'
163-
except:
164-
pass
159+
redirect_uri = oauthlib_error.redirect_uri or ""
160+
separator = '&' if '?' in redirect_uri else '?'
165161

166162
error_response = {
167163
'error': oauthlib_error,

0 commit comments

Comments
 (0)