Cross platform difficulties

This commit is contained in:
2023-10-28 20:27:20 +02:00
parent 2c47456bd4
commit e6b3da2eae

View File

@@ -23,9 +23,12 @@ DB_FILES = {
def d2_running() -> bool: def d2_running() -> bool:
for proc in psutil.process_iter(["name"]): for proc in psutil.process_iter():
if proc.info["name"] == "D2R.exe": try:
if proc.cmdline()[0].endswith("D2R.exe"):
return True return True
except (IndexError, psutil.AccessDenied):
pass
return False return False