DEBUG pid in kill_process() arrive as string. so convert to int
This commit is contained in:
parent
7af207253a
commit
05d600da71
@ -116,10 +116,10 @@ def kill_process(pid):
|
|||||||
Kill single process.
|
Kill single process.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
pid (): Process ID of process to kill # TODO: check if pid is int
|
pid (str): Process ID of process to kill
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
os.kill(pid, signal.SIGKILL)
|
os.kill(str(pid), signal.SIGKILL) # pid apparently arrives as string
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
print("[-] Process {} not found.".format(pid))
|
print("[-] Process {} not found.".format(pid))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user