From 5f7679953788a8c704d7eb884bd54af2eebe5160 Mon Sep 17 00:00:00 2001 From: Tuan Nie Date: Wed, 31 Jul 2024 20:35:56 +0800 Subject: [PATCH] Modify comments in `deploy_helper.py` Translate original Chinese comments in command_checker and setup_logger in script/deploy_helper.py into English. See: #17 --- script/deploy_helper.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/script/deploy_helper.py b/script/deploy_helper.py index b971ab2..7bbbd05 100644 --- a/script/deploy_helper.py +++ b/script/deploy_helper.py @@ -15,9 +15,9 @@ def setup_logger(log_level=logging.INFO): """ - 配置全局日志系统。 + Configure the global logging system. - :param log_level: 设置日志记录级别,默认为 INFO 级别。 + :param log_level: Set the logging level, defaulting to INFO. """ logging.basicConfig(level=log_level, format='%(asctime)s - %(levelname)s - %(message)s', @@ -26,11 +26,11 @@ def setup_logger(log_level=logging.INFO): def command_checker(status_code: int, message: str, expected_code: int = 0): """ - 检查命令执行的状态码是否符合预期。 + Check if the command execution status code meets the expected value. - :param status_code: 实际命令执行的状态码 - :param message: 要记录的日志信息 - :param expected_code: 预期的状态码,默认为0 + :param status_code: The actual status code of the command execution. + :param message: The log message to be recorded. + :param expected_code: The expected status code, defaulting to 0. """ if status_code != expected_code: logging.error(f"Command failed: {message} Expected status code {expected_code}, got status code {status_code}.")