From 543a99acd2150c9f215b22cbc70afd8191a36a53 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Fri, 24 Feb 2023 20:37:10 -0600 Subject: [PATCH] Addon Manager: Linter cleanup of utilities --- src/Mod/AddonManager/addonmanager_utilities.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Mod/AddonManager/addonmanager_utilities.py b/src/Mod/AddonManager/addonmanager_utilities.py index d165192829..f148932419 100644 --- a/src/Mod/AddonManager/addonmanager_utilities.py +++ b/src/Mod/AddonManager/addonmanager_utilities.py @@ -350,8 +350,8 @@ def get_python_exe() -> str: A) The value of the PythonExecutableForPip user preference B) The executable located in the same bin directory as FreeCAD and called "python3" C) The executable located in the same bin directory as FreeCAD and called "python" - D) The result of an shutil search for your system's "python3" executable - E) The result of an shutil search for your system's "python" executable""" + D) The result of a shutil search for your system's "python3" executable + E) The result of a shutil search for your system's "python" executable""" prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons") python_exe = prefs.GetString("PythonExecutableForPip", "Not set") fc_dir = FreeCAD.getHomePath() @@ -445,7 +445,12 @@ def run_interruptable_subprocess(args) -> subprocess.CompletedProcess: p.kill() raise ProcessInterrupted() if return_code is None or return_code != 0: - raise subprocess.CalledProcessError(return_code, args, stdout, stderr) + raise subprocess.CalledProcessError ( + return_code if return_code is not None else -1, + args, + stdout, + stderr + ) return subprocess.CompletedProcess(args, return_code, stdout, stderr)