Commit fa34ba33 authored by ZZH's avatar ZZH

fix event msg 2024-06-04

parent 0a3474bb
...@@ -4,7 +4,9 @@ DATE:2024/5/30 11:34 ...@@ -4,7 +4,9 @@ DATE:2024/5/30 11:34
""" """
from pot_libs.logger import log from pot_libs.logger import log
from unify_api.constants import E_TYPE_MSG_LANG, PHASE_LINE_LANG, E_TYPE_NAME_LANG from unify_api.constants import (
E_TYPE_MSG_LANG, PHASE_LINE_LANG, E_TYPE_NAME_LANG
)
def load_event_msg(e_type, event_param, lang): def load_event_msg(e_type, event_param, lang):
...@@ -15,7 +17,13 @@ def load_event_msg(e_type, event_param, lang): ...@@ -15,7 +17,13 @@ def load_event_msg(e_type, event_param, lang):
if not msg_fmt: if not msg_fmt:
return "" return ""
return msg_fmt.format(**event_param) event_msg = ""
try:
event_msg = msg_fmt.format(**event_param)
except Exception as e:
log.error(f"load_event_msg e,fmt:{msg_fmt}, param:{event_param}, {e}")
finally:
return event_msg
def load_phase_line(mtr_name, lang): def load_phase_line(mtr_name, lang):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment