Skip to content

Commit a9dd56d

Browse files
committed
Clean up create_response
1 parent afbff1c commit a9dd56d

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

flask_oauthlib/utils.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,8 @@ def decode_base64(text):
3232
return to_unicode(base64.b64decode(text), 'utf-8')
3333

3434

35-
def create_response(*args):
35+
def create_response(headers, body, status):
3636
"""Create response class for Flask."""
37-
38-
# changes due to https://github.com/idan/oauthlib/pull/201
39-
if len(args) == 4:
40-
uri, headers, body, status = args
41-
if uri:
42-
headers = {'Location': uri}
43-
elif len(args) == 3:
44-
headers, body, status = args
45-
else:
46-
raise ValueError('invalid arguments %r', args)
47-
4837
response = Response(body or '')
4938
for k, v in headers.items():
5039
response.headers[k] = v

0 commit comments

Comments
 (0)