Commit 7a608fc6 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/progmodes/python.el: Be more careful about temp file removal

(python-shell-prompt-detect): Use unwind-protect to try and not leave
file behind in case of error.
parent b3cab419
Pipeline #1292 passed with stage
in 26 minutes and 1 second
......@@ -2266,6 +2266,7 @@ detection and just returns nil."
;; carriage returns in unbuffered mode.
(let ((inhibit-eol-conversion (getenv "PYTHONUNBUFFERED")))
(python-shell--save-temp-file code))))
;; Use `process-file' as it is remote-host friendly.
......@@ -2274,7 +2275,7 @@ detection and just returns nil."
;; Try to cleanup
(delete-file code-file)))
(delete-file code-file))))
(catch 'prompts
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment