Check if kernel is alive before attempting to execute cell

This commit is contained in:
Nathaniel Nicandro 2018-01-17 21:02:56 -06:00
parent f67a486e9a
commit a363f639dd

View file

@ -967,8 +967,12 @@ execute the current cell."
(goto-char (point-max))
(jupyter-repl-cell-beginning-position)))
(goto-char (point-max))
(if force
(jupyter-execute-request jupyter-repl-current-client)
(unless (or (and jupyter-repl-kernel-manager
(jupyter-kernel-alive-p jupyter-repl-kernel-manager))
(jupyter-hb-beating-p
(oref jupyter-repl-current-client hb-channel)))
(error "Kernel not alive"))
(if force (jupyter-execute-request jupyter-repl-current-client)
(if (not jupyter-repl-use-builtin-is-complete)
(let ((res (jupyter-wait-until-received
:is-complete-reply