From b6e4f71baae45899e43a65a5f899f2043ac1e3f5 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 4 Aug 2022 09:40:22 -0600 Subject: framework psutil usage: let the kill proceed Instead of skipping the whole kill/check loop if psutil module is not found, instead just skip the check part - should be okay to issue the kill. Signed-off-by: Mats Wichmann --- testing/framework/TestCmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py index 8d258ac..aabd1dc 100644 --- a/testing/framework/TestCmd.py +++ b/testing/framework/TestCmd.py @@ -399,7 +399,7 @@ def clean_up_ninja_daemon(self, result_type) -> None: Working directory and temp files are removed. Skipped if this platform doesn't have psutil (e.g. msys2 on Windows) """ - if not self or not HAVE_PSUTIL: + if not self: return for path in Path(self.workdir).rglob('.ninja'): @@ -416,7 +416,7 @@ def clean_up_ninja_daemon(self, result_type) -> None: except OSError: pass - while True: + while HAVE_PSUTIL: if pid not in [proc.pid for proc in psutil.process_iter()]: break else: -- cgit v0.12