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:
|
else:
|
||||||
return False
|
return False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.critical(e)
|
logger.debug(e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+13
-4
@@ -30,6 +30,7 @@ def is_steam_running(cmd: str) -> bool:
|
|||||||
def is_sandboxed() -> bool:
|
def is_sandboxed() -> bool:
|
||||||
return bool(os.environ.get("FLATPAK_ID"))
|
return bool(os.environ.get("FLATPAK_ID"))
|
||||||
|
|
||||||
|
|
||||||
def get_flatpak_output() -> list[str]:
|
def get_flatpak_output() -> list[str]:
|
||||||
proc = subprocess.check_output(
|
proc = subprocess.check_output(
|
||||||
[FLATPAK_CMD, "ps", "--columns=application"], text=True
|
[FLATPAK_CMD, "ps", "--columns=application"], text=True
|
||||||
@@ -37,15 +38,23 @@ def get_flatpak_output() -> list[str]:
|
|||||||
lines = proc.splitlines()
|
lines = proc.splitlines()
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
|
|
||||||
def is_flatpak_steam_running() -> bool:
|
def is_flatpak_steam_running() -> bool:
|
||||||
if is_sandboxed():
|
if is_sandboxed():
|
||||||
return True
|
return True
|
||||||
if has_cmd(FLATPAK_CMD) is False:
|
if has_cmd(FLATPAK_CMD) is False:
|
||||||
return False
|
return False
|
||||||
lines = get_flatpak_output()
|
try:
|
||||||
if FLATPAK_APPID in lines:
|
proc = subprocess.check_output(
|
||||||
return True
|
[FLATPAK_CMD, "ps", "--columns=application"], text=True
|
||||||
return False
|
)
|
||||||
|
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]]:
|
def get_steam_procs() -> list[list[str]]:
|
||||||
|
|||||||
Reference in new issue
Block a user