mirror of
https://github.com/aclist/dztui.git
synced 2026-10-29 14:12:45 +01:00
feat: wait for DayZ process
This commit is contained in:
1 parent
ff0ced1c33
commit
fb5397ae91
4 files changed
+27
-12
No files matched your search
+8
-1
@@ -16,7 +16,14 @@ from dzgui.util.strings import init
|
||||
|
||||
# TODO: move to util.proc
|
||||
def is_dayz_running() -> bool:
|
||||
return is_running(DAYZ_BINARY)
|
||||
procs = []
|
||||
substring = DAYZ_BINARY
|
||||
for proc in psutil.process_iter():
|
||||
try:
|
||||
procs.append(proc.cmdline())
|
||||
except Exception as e:
|
||||
continue
|
||||
return any(substring in item for sublist in procs for item in sublist)
|
||||
|
||||
|
||||
def is_steam_running(cmd: str) -> bool:
|
||||
|
||||
Reference in new issue
Block a user