Skip to content

Commit c7bad67

Browse files
committed
Don't break in buffer not visiting a file
* le-python.el (lispy--python-poetry-name): Fix
1 parent 5d9a3d4 commit c7bad67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

le-python.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ it at one time."
298298
(defvar lispy--python-init-file nil)
299299

300300
(defun lispy--python-poetry-name ()
301-
(when-let* ((root (locate-dominating-file (buffer-file-name) "pyproject.toml"))
301+
(when-let* ((bfn (buffer-file-name))
302+
(root (locate-dominating-file bfn "pyproject.toml"))
302303
(pyproject (file-name-directory root)))
303304
(and (file-exists-p pyproject)
304305
(not (equal python-shell-interpreter "python"))

0 commit comments

Comments
 (0)