mirror of
https://github.com/majmongoose/PageBot.git
synced 2024-11-26 22:38:37 -05:00
parent
43f8b3869e
commit
96a4e1f5c2
@ -99,7 +99,7 @@ def kill_existing_ttd_instances():
|
|||||||
"""Terminate all running instances of TTD."""
|
"""Terminate all running instances of TTD."""
|
||||||
for proc in psutil.process_iter(['name', 'exe', 'cmdline']):
|
for proc in psutil.process_iter(['name', 'exe', 'cmdline']):
|
||||||
try:
|
try:
|
||||||
if 'twotone' in proc.name().lower() or 'twotone' in ' '.join(proc.cmdline()).lower():
|
if 'ttd' in proc.name().lower() or 'ttd' in ' '.join(proc.cmdline()).lower():
|
||||||
print("Terminating an existing instance of TTD...")
|
print("Terminating an existing instance of TTD...")
|
||||||
proc.terminate() # Send SIGTERM
|
proc.terminate() # Send SIGTERM
|
||||||
proc.wait() # Wait for the process to terminate
|
proc.wait() # Wait for the process to terminate
|
||||||
|
Loading…
Reference in New Issue
Block a user