summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2022-08-04 09:40:22 -0600
committerMats Wichmann <mats@linux.com>2022-08-04 09:40:22 -0600
commitb6e4f71baae45899e43a65a5f899f2043ac1e3f5 (patch)
tree90b0b69a701d0bdbd3ca29b018f26d6b1ee770d3
parent61b40e68e833fa88f70067fd99ee556dcb3d3fa7 (diff)
downloadscons-git-b6e4f71baae45899e43a65a5f899f2043ac1e3f5.tar.gz
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 <mats@linux.com>
-rw-r--r--testing/framework/TestCmd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py
index 8d258aca3..aabd1dc02 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: