Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip headers from jupyter kernelspec list. #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions jupyter-kernelspec.el
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ REFRESH."
(or (and (not refresh) (jupyter-kernelspecs-cache-get host))
(let ((specs
(plist-get
(let ((json (or (jupyter-command "kernelspec" "list"
"--json" "--log-level" "ERROR")
(let ((json (or (let* ((jupyter-output (jupyter-command "kernelspec" "list"
"--json" "--log-level" "ERROR"))
(json-start (string-match-p (rx line-start "{") jupyter-output)))
(and json-start (substring jupyter-output json-start)))
(error "\
Can't obtain kernelspecs from jupyter shell command"))))
(condition-case nil
Expand Down