From 60b22cc6d180985b2dfa0aa19d898a9b27e7672f Mon Sep 17 00:00:00 2001 From: Aman Goel Date: Tue, 10 Sep 2024 23:11:29 +0000 Subject: [PATCH] Minor correction --- avr_pr.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avr_pr.py b/avr_pr.py index 853f786..b52e909 100755 --- a/avr_pr.py +++ b/avr_pr.py @@ -431,8 +431,11 @@ def terminate_ps(pid_s): valid, pid = is_valid_pid(pid_s) if (valid): if (check_pid(pid)): - os.kill(pid, signal.SIGTERM) - os.kill(pid, signal.SIGKILL) + try: + os.kill(pid, signal.SIGTERM) + os.kill(pid, signal.SIGKILL) + except ProcessLookupError: + pass #else: #assert(0)