Skip to content

Commit 3fca927

Browse files
authored
Add support async cm (#106)
1 parent 0ab83b4 commit 3fca927

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_archive/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from http.client import responses
1010

1111
from jupyter_server.base.handlers import JupyterHandler
12-
from jupyter_server.utils import url2path, url_path_join
12+
from jupyter_server.utils import url2path, url_path_join, ensure_async
1313
from tornado import ioloop, web
1414
from urllib.parse import quote
1515

@@ -123,7 +123,7 @@ async def get(self, archive_path, include_body=False):
123123
self.check_xsrf_cookie()
124124
cm = self.contents_manager
125125

126-
if cm.is_hidden(archive_path) and not cm.allow_hidden:
126+
if await ensure_async(cm.is_hidden(archive_path)) and not cm.allow_hidden:
127127
self.log.info("Refusing to serve hidden file, via 404 Error")
128128
raise web.HTTPError(404)
129129

0 commit comments

Comments
 (0)