summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2019-04-17 09:32:40 -0700
committerGlenn Morris <rgm@gnu.org>2019-04-17 09:32:40 -0700
commit0797897f34467272b150eba54aa3bbff19e92aa1 (patch)
treede30b455898572def032c92a57955ebc36d2b496 /lisp/progmodes
parent41d9004e1cf50aa18720b52c6228b06e35ca96f5 (diff)
parenta1c53d4294550380de76d6a6c4e29e9e8f6f9133 (diff)
downloademacs-0797897f34467272b150eba54aa3bbff19e92aa1.tar.gz
Merge from origin/emacs-26
a1c53d4 (origin/emacs-26) * admin/admin.el (make-manuals-dist--1): Up... d0f745f Document some compilation-mode faces 23ccba0 Mention the assignment form in "Copyright Assignment" 0f5568e Fix confusing wording in the user manual 70ec392 Fix the MSDOS build when running under CWSDPMI 7a608fc * lisp/progmodes/python.el: Be more careful about temp file r...
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/python.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 5193501f716..eb3e31c4b77 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2303,15 +2303,16 @@ 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.
- (process-file
- interpreter
- code-file
- '(t nil)
- nil
- interpreter-arg)
- ;; Try to cleanup
- (delete-file code-file)))
+ (unwind-protect
+ ;; Use `process-file' as it is remote-host friendly.
+ (process-file
+ interpreter
+ code-file
+ '(t nil)
+ nil
+ interpreter-arg)
+ ;; Try to cleanup
+ (delete-file code-file))))
(buffer-string)))
(prompts
(catch 'prompts