summaryrefslogtreecommitdiff
path: root/backend/decky_loader/helpers.py
diff options
context:
space:
mode:
authorsuchmememanyskill <38142618+suchmememanyskill@users.noreply.github.com>2024-07-14 11:45:52 +0200
committersuchmememanyskill <38142618+suchmememanyskill@users.noreply.github.com>2024-07-14 11:45:52 +0200
commitfae0bb3a6f81a8da6e4c9a2d551b0e0bdbf32173 (patch)
tree799708819bd1374dc2d1374ec3bea658f886372b /backend/decky_loader/helpers.py
parentdc9f89afad5d412e61b4924fde77f507a941b734 (diff)
downloaddecky-loader-fae0bb3a6f81a8da6e4c9a2d551b0e0bdbf32173.tar.gz
decky-loader-fae0bb3a6f81a8da6e4c9a2d551b0e0bdbf32173.zip
Fix misuse of pyinstaller
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 c6778352..bfc53967 100644
--- a/backend/decky_loader/helpers.py
+++ b/backend/decky_loader/helpers.py
@@ -90,7 +90,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 []