From 751b55ec80e70228b0126452d8057fbfeaafb3a6 Mon Sep 17 00:00:00 2001 From: Caohongtao Date: Tue, 26 Dec 2023 08:56:50 +0000 Subject: [PATCH] update ceres/function/util.py. Signed-off-by: Caohongtao --- ceres/function/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ceres/function/util.py b/ceres/function/util.py index 433db09..a226c5f 100644 --- a/ceres/function/util.py +++ b/ceres/function/util.py @@ -59,7 +59,7 @@ def validate_data(data: Any, schema: dict) -> bool: validate(instance=data, schema=schema) return True except ValidationError as e: - LOGGER.error(e.message) + LOGGER.error(f'Failed to validate data, error:{e.message}') return False @@ -131,7 +131,7 @@ def load_gopher_config(gopher_config_path: str) -> AttrDict: with open(gopher_config_path, 'r', encoding='utf8') as file: cfg = load(file) except FileNotFoundError: - LOGGER.error(f"Can't find file {gopher_config_path}.") + LOGGER.error(f'Failed tofind file {gopher_config_path}.') return AttrDict() except ConfigParseError: LOGGER.error(f'Failed to parse file {gopher_config_path}.') @@ -151,7 +151,7 @@ def plugin_status_judge(plugin_name: str) -> str: """ service_name = INFORMATION_ABOUT_RPM_SERVICE.get(plugin_name, {}).get('service_name') if service_name is None: - LOGGER.warning(f"Fail to get service name about {plugin_name}") + LOGGER.warning(f'Failed to get service name about {plugin_name}') return "" return_code, stdout, _ = execute_shell_command(f"systemctl status {service_name}|grep Active") -- Gitee