Skip to content

Commit 8188458

Browse files
committed
better string format
1 parent 1275e27 commit 8188458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ def get_redirect_uri(request):
221221
"""Returns OAuth redirect URI."""
222222
parsed_url = urlparse(request.url)
223223
if parsed_url.hostname == 'localhost':
224-
return str.format('http://{0}:{1}/submit', parsed_url.hostname, parsed_url.port)
225-
return str.format('https://{0}/submit', parsed_url.hostname)
224+
return 'http://{hostname}:{port}/submit'.format(hostname=parsed_url.hostname, port=parsed_url.port)
225+
return 'https://{hostname}/submit'.format(hostname=parsed_url.hostname)
226226

227227
if __name__ == '__main__':
228228
app.run(port=7000)

0 commit comments

Comments
 (0)