11 Star 1 Fork 16

src-openEuler/sysSentry

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-word-error.patch 2.64 KB
一键复制 编辑 原始数据 按行查看 历史
jinsaihang 提交于 2024-10-16 16:35 . optimize log printing
From 5be0d121c6fde185d323dc4bcf3026e2c3ee8757 Mon Sep 17 00:00:00 2001
From: jinsaihang <jinsaihang@h-partners.com>
Date: Mon, 14 Oct 2024 11:30:58 +0800
Subject: [PATCH] fix word error
Signed-off-by: jinsaihang <jinsaihang@h-partners.com>
---
sysSentry-1.0.2/src/python/syssentry/alarm.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/python/syssentry/alarm.py b/src/python/syssentry/alarm.py
index d012901..bff527c 100644
--- a/src/python/syssentry/alarm.py
+++ b/src/python/syssentry/alarm.py
@@ -49,7 +49,7 @@ MAX_ALARM_ID = (MIN_ALARM_ID + MAX_NUM_OF_ALARM_ID - 1)
def update_alarm_list(alarm_info: Xalarm):
alarm_id = xalarm_getid(alarm_info)
if alarm_id < MIN_ALARM_ID or alarm_id > MAX_ALARM_ID:
- logging.warnning(f"Invalid alarm_id {alarm_id}")
+ logging.warning(f"Invalid alarm_id {alarm_id}")
return
timestamp = xalarm_gettime(alarm_info)
if not timestamp:
@@ -97,14 +97,14 @@ def alarm_register():
task = TasksMap.tasks_dict[task_type][task_name]
alarm_id = task.alarm_id
if not check_alarm_id_if_number(alarm_id):
- logging.warnning(f"Invalid alarm_id {alarm_id}: ignore {task_name} alarm")
+ logging.warning(f"Invalid alarm_id {alarm_id}: ignore {task_name} alarm")
continue
if alarm_id < MIN_ALARM_ID or alarm_id > MAX_ALARM_ID:
- logging.warnning(f"Invalid alarm_id {alarm_id}: ignore {task_name} alarm")
+ logging.warning(f"Invalid alarm_id {alarm_id}: ignore {task_name} alarm")
continue
alarm_clear_time = task.alarm_clear_time
if not check_alarm_clear_time_if_positive_integer(alarm_clear_time):
- logging.warnning(f"Invalid alarm_clear_time {alarm_clear_time}: ignore {task_name} alarm")
+ logging.warning(f"Invalid alarm_clear_time {alarm_clear_time}: ignore {task_name} alarm")
continue
try:
alarm_clear_time = int(alarm_clear_time)
@@ -113,7 +113,7 @@ def alarm_register():
if alarm_clear_time > sys.maxsize:
raise ValueError("Exceeds maximum value for int")
except (ValueError, OverflowError, TypeError) as e:
- logging.warnning(f"Invalid alarm_clear_time {alarm_clear_time}: ignore {task_name} alarm")
+ logging.warning(f"Invalid alarm_clear_time {alarm_clear_time}: ignore {task_name} alarm")
continue
alarm_list_dict[alarm_id] = []
task_alarm_id_dict[task_name] = alarm_id
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/sysSentry.git
git@gitee.com:src-openeuler/sysSentry.git
src-openeuler
sysSentry
sysSentry
master

搜索帮助