From 05d600da719dc3e2a5c77826016001264e08af8e Mon Sep 17 00:00:00 2001 From: Sebastian Lenzlinger <74497638+sebaschi@users.noreply.github.com> Date: Wed, 7 Jun 2023 18:44:12 +0200 Subject: [PATCH] DEBUG pid in kill_process() arrive as string. so convert to int --- src/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.py b/src/utils.py index de88229..67e12bb 100755 --- a/src/utils.py +++ b/src/utils.py @@ -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))