Cross platform difficulties
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user