From 370b22b032dce9290eebca1cf8d48bd155164b6a Mon Sep 17 00:00:00 2001 From: shixuantong Date: Wed, 24 Jul 2024 17:53:58 +0800 Subject: [PATCH] fix error handling --- sysSentry-1.0.2/src/python/syssentry/cpu_sentry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysSentry-1.0.2/src/python/syssentry/cpu_sentry.py b/sysSentry-1.0.2/src/python/syssentry/cpu_sentry.py index 3c4d58d..d0bafa8 100644 --- a/sysSentry-1.0.2/src/python/syssentry/cpu_sentry.py +++ b/sysSentry-1.0.2/src/python/syssentry/cpu_sentry.py @@ -87,7 +87,7 @@ class CpuSentry: } def handle_cpu_output(self, stdout: str): - if "" in stdout: + if "ERROR" in stdout: self.send_result["result"] = ResultLevel.FAIL self.send_result["details"]["code"] = 1004 self.send_result["details"]["msg"] = stdout.split("\n")[0] -- Gitee