mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 22:13:00 +00:00
Autoformat with black
This commit is contained in:
@@ -1477,10 +1477,14 @@ class UserUrlHandler(BaseHandler):
|
|||||||
|
|
||||||
# if request is expecting JSON, assume it's an API request and fail with 503
|
# 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
|
# because it won't like the redirect to the pending page
|
||||||
if get_accepted_mimetype(
|
if (
|
||||||
self.request.headers.get('Accept', ''),
|
get_accepted_mimetype(
|
||||||
choices=['application/json', 'text/html'],
|
self.request.headers.get('Accept', ''),
|
||||||
) == 'application/json' or 'api' in user_path.split('/'):
|
choices=['application/json', 'text/html'],
|
||||||
|
)
|
||||||
|
== 'application/json'
|
||||||
|
or 'api' in user_path.split('/')
|
||||||
|
):
|
||||||
self._fail_api_request(user_name, server_name)
|
self._fail_api_request(user_name, server_name)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@@ -79,7 +79,7 @@ class LogoutHandler(BaseHandler):
|
|||||||
|
|
||||||
async def get(self):
|
async def get(self):
|
||||||
"""Log the user out, call the custom action, forward the user
|
"""Log the user out, call the custom action, forward the user
|
||||||
to the logout page
|
to the logout page
|
||||||
"""
|
"""
|
||||||
await self.default_handle_logout()
|
await self.default_handle_logout()
|
||||||
await self.handle_logout()
|
await self.handle_logout()
|
||||||
|
Reference in New Issue
Block a user