mirror of
https://github.com/aclist/dztui.git
synced 2026-11-17 07:11:55 +01:00
change: swallow stderr
This commit is contained in:
1 parent
d2208787b4
commit
ea41503dad
2 files changed
+14
-5
No files matched your search
@@ -23,7 +23,7 @@ def has_flatpak_client() -> bool:
|
||||
else:
|
||||
return False
|
||||
except Exception as e:
|
||||
logger.critical(e)
|
||||
logger.debug(e)
|
||||
return False
|
||||
|
||||
|
||||
|
||||
+13
-4
@@ -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()
|
||||
if FLATPAK_APPID in lines:
|
||||
return True
|
||||
return False
|
||||
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]]:
|
||||
|
||||
Reference in new issue
Block a user