Skip to content

Commit 986bd01

Browse files
authored
Merge pull request #220 from cool-RR/patch-2
Fix exception cause in ptshell.py
2 parents 2e60d2b + 5f204f8 commit 986bd01

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
@@ -414,9 +414,9 @@ def init_kernel_info(self):
414414
while True:
415415
try:
416416
reply = self.client.get_shell_msg(timeout=1)
417-
except Empty:
417+
except Empty as e:
418418
if (time.time() - tic) > timeout:
419-
raise RuntimeError("Kernel didn't respond to kernel_info_request")
419+
raise RuntimeError("Kernel didn't respond to kernel_info_request") from e
420420
else:
421421
if reply['parent_header'].get('msg_id') == msg_id:
422422
self.kernel_info = reply['content']

0 commit comments

Comments
 (0)