Skip to content

Commit 4d3cb82

Browse files
authored
Handle asyncio timeout (#41)
1 parent 49e807e commit 4d3cb82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytest_jupyter/jupyter_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) Jupyter Development Team.
22
# Distributed under the terms of the Modified BSD License.
33

4+
import asyncio
45
import importlib
56
import io
67
import logging
@@ -69,7 +70,7 @@ async def get_server():
6970
if hasattr(server, "close_all_connections"):
7071
try:
7172
io_loop.run_sync(server.close_all_connections)
72-
except TimeoutError:
73+
except asyncio.TimeoutError:
7374
pass
7475

7576
http_server_port[0].close()

0 commit comments

Comments
 (0)