Skip to content

Commit 6e6c7de

Browse files
authored
Fix exception cause in ptshell.py
1 parent 81fcbde commit 6e6c7de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_console/ptshell.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ def init_kernel_info(self):
365365
while True:
366366
try:
367367
reply = self.client.get_shell_msg(timeout=1)
368-
except Empty:
368+
except Empty as e:
369369
if (time.time() - tic) > timeout:
370-
raise RuntimeError("Kernel didn't respond to kernel_info_request")
370+
raise RuntimeError("Kernel didn't respond to kernel_info_request") from e
371371
else:
372372
if reply['parent_header'].get('msg_id') == msg_id:
373373
self.kernel_info = reply['content']

0 commit comments

Comments
 (0)