Cross platform difficulties
This commit is contained in:
@@ -23,9 +23,12 @@ DB_FILES = {
|
||||
|
||||
|
||||
def d2_running() -> bool:
|
||||
for proc in psutil.process_iter(["name"]):
|
||||
if proc.info["name"] == "D2R.exe":
|
||||
for proc in psutil.process_iter():
|
||||
try:
|
||||
if proc.cmdline()[0].endswith("D2R.exe"):
|
||||
return True
|
||||
except (IndexError, psutil.AccessDenied):
|
||||
pass
|
||||
return False
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user