Skip to content

Commit

Permalink
Modify comments in deploy_helper.py
Browse files Browse the repository at this point in the history
Translate original Chinese comments in command_checker and setup_logger in script/deploy_helper.py into English.

See: #1
  • Loading branch information
ajiankexx committed Aug 1, 2024
1 parent d6bbee2 commit d9f40f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions script/deploy_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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}.")
Expand Down

0 comments on commit d9f40f6

Please sign in to comment.