change: swallow stderr

This commit is contained in:
aclist committed 2026-11-17 02:10:38 +09:00
1 parent d2208787b4
commit ea41503dad
2 files changed
+11 -2

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ def has_flatpak_client() -> bool:
else:
return False
except Exception as e:
logger.critical(e)
logger.debug(e)
return False
+10 -1
View File
@@ -30,6 +30,7 @@ def is_steam_running(cmd: str) -> bool:
def is_sandboxed() -> bool:
return bool(os.environ.get("FLATPAK_ID"))
def get_flatpak_output() -> list[str]:
proc = subprocess.check_output(
[FLATPAK_CMD, "ps", "--columns=application"], text=True
@@ -37,15 +38,23 @@ def get_flatpak_output() -> list[str]:
lines = proc.splitlines()
return lines
def is_flatpak_steam_running() -> bool:
if is_sandboxed():
return True
if has_cmd(FLATPAK_CMD) is False:
return False
lines = get_flatpak_output()
try:
proc = subprocess.check_output(
[FLATPAK_CMD, "ps", "--columns=application"], text=True
)
lines = proc.splitlines()
if FLATPAK_APPID in lines:
return True
return False
except Exception as e:
logger.debug(e)
return False
def get_steam_procs() -> list[list[str]]: