From c8f98618e82ced69a869e14faa4bf1fe756fedbe Mon Sep 17 00:00:00 2001 From: SXP-Simon Date: Sun, 8 Feb 2026 17:07:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=8A=A8=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=A0=BC=E5=BC=8F=E4=BB=A5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=97=A7=E7=89=88=E6=9C=AC=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/config.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/config.py b/src/core/config.py index c6734e6..5858e6b 100644 --- a/src/core/config.py +++ b/src/core/config.py @@ -63,7 +63,15 @@ class ConfigManager: val = self.config.get("auto_analysis_time", ["09:00"]) # 兼容旧版本字符串配置 if isinstance(val, str): - return [val] + val_list = [val] + # 自动修复配置格式 + try: + self.config["auto_analysis_time"] = val_list + self.config.save_config() + logger.info(f"自动修复配置格式 auto_analysis_time: {val} -> {val_list}") + except Exception as e: + logger.warning(f"修复配置格式失败: {e}") + return val_list return val if isinstance(val, list) else ["09:00"] def get_enable_auto_analysis(self) -> bool: