summaryrefslogtreecommitdiff
path: root/backend/decky_loader/helpers.py
diff options
context:
space:
mode:
authorSims <38142618+suchmememanyskill@users.noreply.github.com>2024-08-05 00:00:49 +0200
committerGitHub <noreply@github.com>2024-08-05 00:00:49 +0200
commit75aa1e4851445646994ba3a61ff41325403359fb (patch)
tree1533ed1d9db0834109153c50b9507f2b67fd9ccb /backend/decky_loader/helpers.py
parentdcfaf11696edbed2a9c0be01a7c37e8faab773bc (diff)
downloaddecky-loader-75aa1e4851445646994ba3a61ff41325403359fb.tar.gz
decky-loader-75aa1e4851445646994ba3a61ff41325403359fb.zip
Sims/pyinstaller misuse fix (#657)
* Fix misuse of pyinstaller * Fix breaking change * Fix pywright import errors
Diffstat (limited to 'backend/decky_loader/helpers.py')
-rw-r--r--backend/decky_loader/helpers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/decky_loader/helpers.py b/backend/decky_loader/helpers.py
index 05c4fc8e..2e0fe45f 100644
--- a/backend/decky_loader/helpers.py
+++ b/backend/decky_loader/helpers.py
@@ -93,7 +93,11 @@ def get_system_pythonpaths() -> list[str]:
proc = subprocess.run(["python3" if localplatform.ON_LINUX else "python", "-c", "import sys; print('\\n'.join(x for x in sys.path if x))"],
# TODO make this less insane
capture_output=True, user=localplatform.localplatform._get_user_id() if localplatform.ON_LINUX else None, env={} if localplatform.ON_LINUX else None) # pyright: ignore [reportPrivateUsage]
- return [x.strip() for x in proc.stdout.decode().strip().split("\n")]
+
+ proc.check_returncode()
+
+ versions = [x.strip() for x in proc.stdout.decode().strip().split("\n")]
+ return [x for x in versions if x and not x.isspace()]
except Exception as e:
logger.warn(f"Failed to execute get_system_pythonpaths(): {str(e)}")
return []