Autoformat with black

This commit is contained in:
YuviPanda
2020-11-17 15:39:21 +05:30
parent 6c5fb5fe97
commit a7b796fa57
2 changed files with 9 additions and 5 deletions

View File

@@ -1477,10 +1477,14 @@ class UserUrlHandler(BaseHandler):
# if request is expecting JSON, assume it's an API request and fail with 503
# because it won't like the redirect to the pending page
if get_accepted_mimetype(
self.request.headers.get('Accept', ''),
choices=['application/json', 'text/html'],
) == 'application/json' or 'api' in user_path.split('/'):
if (
get_accepted_mimetype(
self.request.headers.get('Accept', ''),
choices=['application/json', 'text/html'],
)
== 'application/json'
or 'api' in user_path.split('/')
):
self._fail_api_request(user_name, server_name)
return