Skip to content

Commit 80d7dc0

Browse files
committed
don't throw timeout exception
1 parent c24ad0c commit 80d7dc0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jupyterlab_kernel_usage/handlers.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
from packaging import version
1414

15+
import logging
16+
logger = logging.getLogger()
17+
logger.setLevel(logging.INFO)
18+
1519

1620
USAGE_IS_SUPPORTED = version.parse("6.9.0") <= version.parse(ipykernel.__version__)
1721

@@ -43,7 +47,8 @@ async def get(self, matched_part=None, *args, **kwargs):
4347
timeout_ms = int(1000 * timeout)
4448
events = dict(poller.poll(timeout_ms))
4549
if not events:
46-
raise TimeoutError("Timeout waiting for response")
50+
self.write(json.dumps({}))
51+
break
4752
if control_socket not in events:
4853
continue
4954
res = await client.control_channel.get_msg(timeout=0)

0 commit comments

Comments
 (0)