26 lines
840 B
Diff
26 lines
840 B
Diff
|
|
From 370b22b032dce9290eebca1cf8d48bd155164b6a Mon Sep 17 00:00:00 2001
|
||
|
|
From: shixuantong <shixuantong1@huawei.com>
|
||
|
|
Date: Wed, 24 Jul 2024 17:53:58 +0800
|
||
|
|
Subject: [PATCH] fix error handling
|
||
|
|
|
||
|
|
---
|
||
|
|
src/python/syssentry/cpu_sentry.py | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/src/python/syssentry/cpu_sentry.py b/src/python/syssentry/cpu_sentry.py
|
||
|
|
index 3c4d58d..d0bafa8 100644
|
||
|
|
--- a/src/python/syssentry/cpu_sentry.py
|
||
|
|
+++ b/src/python/syssentry/cpu_sentry.py
|
||
|
|
@@ -87,7 +87,7 @@ class CpuSentry:
|
||
|
|
}
|
||
|
|
|
||
|
|
def handle_cpu_output(self, stdout: str):
|
||
|
|
- if "<ERROR>" 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]
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|