Skip to content

Commit

Permalink
check_process() True only if python opened file.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbridak committed Nov 13, 2023
1 parent a582ac3 commit 62e6f27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion not1mm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def check_process(name: str) -> bool:
for proc in psutil.process_iter():
try:
if len(proc.cmdline()) == 2:
if name in proc.cmdline()[1]:
if name in proc.cmdline()[1] and "python" in proc.cmdline()[0]:
return True
except (psutil.NoSuchProcess, psutil.ZombieProcess):
continue
Expand Down

0 comments on commit 62e6f27

Please sign in to comment.