DEBUG pid in kill_process() arrive as string. so convert to int

This commit is contained in:
Sebastian Lenzlinger 2023-06-07 18:44:12 +02:00
parent 7af207253a
commit 05d600da71

View File

@ -116,10 +116,10 @@ def kill_process(pid):
Kill single process.
Args:
pid (): Process ID of process to kill # TODO: check if pid is int
pid (str): Process ID of process to kill
"""
try:
os.kill(pid, signal.SIGKILL)
os.kill(str(pid), signal.SIGKILL) # pid apparently arrives as string
except ProcessLookupError:
print("[-] Process {} not found.".format(pid))