Skip to content

Commit

Permalink
jupyter-tramp-server-from-file-name: Fix password authenticator
Browse files Browse the repository at this point in the history
fixes #480
  • Loading branch information
nnicandro committed Jul 6, 2023
1 parent 2f14f2e commit 1baabc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions jupyter-rest-api.el
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,9 @@ slot of CLIENT and restore the AUTH slot on failure."
&optional passwd)
"Authenticate CLIENT by asking for a password.
If PASSWD is provided it must be a function that takes zero
arguments. It will be called before each authentication attempt.
If CLIENT could not be authenticated raise an error."
arguments and returns a password, it defaults to a call to
`read-passwd'. It will be called before each authentication
attempt. If CLIENT could not be authenticated raise an error."
(or (functionp passwd)
(setq passwd (lambda () (read-passwd (format "Password [%s]: "
(oref client url))))))
Expand Down
5 changes: 2 additions & 3 deletions jupyter-tramp.el
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,9 @@ fails."
(jupyter-api-authenticate client
'password
(let ((remote (file-remote-p filename)))
(lambda (try)
(lambda ()
(jupyter-tramp-read-passwd
filename (unless (zerop try)
(format "Password for %s " remote))))))))))))))
filename (format "Password [%s]: " remote)))))))))))))

;;; Getting information about file models

Expand Down

0 comments on commit 1baabc8

Please sign in to comment.