From 2463a33c5c3b8eb38da8f064459900159330bb47 Mon Sep 17 00:00:00 2001 From: Matthias Meulien Date: Sun, 9 Jul 2023 07:45:57 +0200 Subject: [PATCH 1/2] Fix "Improve Python imports management commands" * lisp/progmodes/python.el (python--do-isort): The isort library don't check for its version itself! --- lisp/progmodes/python.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4291ab03ca6..8ce10621ed3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -6556,13 +6556,9 @@ python--do-isort nil (list temp nil) nil "-m" "isort" "-" args)) (tick (buffer-chars-modified-tick))) - (cond - ((eq 1 status) + (unless (eq 0 status) (error "%s exited with status %s (maybe isort is missing?)" python-interpreter status)) - ((eq 2 status) - (error "%s exited with status %s (maybe isort version is <5.7.0?)" - python-interpreter status))) (replace-buffer-contents temp) (not (eq tick (buffer-chars-modified-tick))))))))) -- 2.39.2