From 0c6bb44ea53c8a7ff0da76e7804283d377ef7fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 2 Mar 2021 10:05:49 +0100 Subject: [PATCH] donate_cpu_lib.py: fixed timeout handling - again (#3158) --- tools/donate_cpu_lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/donate_cpu_lib.py b/tools/donate_cpu_lib.py index 0b8e5c320..50f97c1e2 100644 --- a/tools/donate_cpu_lib.py +++ b/tools/donate_cpu_lib.py @@ -16,7 +16,7 @@ import psutil # Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/ # Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic # changes) -CLIENT_VERSION = "1.3.10" +CLIENT_VERSION = "1.3.11" # Timeout for analysis with Cppcheck in seconds CPPCHECK_TIMEOUT = 30 * 60 @@ -272,9 +272,9 @@ def run_command(cmd): try: # call with timeout since it might get stuck e.g. gcc-arm-none-eabi comm = p.communicate(timeout=5) + p = None except subprocess.TimeoutExpired: pass - p = None finally: if p: os.killpg(os.getpgid(p.pid), signal.SIGTERM) # Send the signal to all the process groups