Skip to content

Commit

Permalink
Addon Manager: Fix undeclared variable in error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes committed Oct 3, 2022
1 parent 14cf777 commit 9b41835
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mod/AddonManager/manage_python_dependencies.py
Expand Up @@ -79,6 +79,7 @@ def call_pip(args) -> List[str]:
if python_exe:
call_args = [python_exe, "-m", "pip", "--disable-pip-version-check"]
call_args.extend(args)
proc = None
try:
proc = subprocess.run(
call_args,
Expand Down Expand Up @@ -106,8 +107,10 @@ def call_pip(args) -> List[str]:
if not pip_failed:
data = proc.stdout.decode()
result = data.split("\n")
else:
elif proc:
raise Exception(proc.stderr.decode())
else:
raise Exception("pip timed out")
else:
raise Exception("Could not locate Python executable on this system")
return result
Expand Down

0 comments on commit 9b41835

Please sign in to comment.