fix(config): 添加对 identity_detail 字段的非空校验
- 在配置文件加载过程中,增加了对 [identity] 部分的 identity_detail 字段的非空检查 - 如果 identity_detail 为空字符串,将抛出 ValueError 异常
This commit is contained in:
@@ -719,6 +719,7 @@ class BotConfig:
|
||||
|
||||
# identity_detail字段非空检查
|
||||
if not config.identity_detail:
|
||||
logger.error("配置文件错误:[identity] 部分的 identity_detail 不能为空字符串")
|
||||
raise ValueError("配置文件错误:[identity] 部分的 identity_detail 不能为空字符串")
|
||||
|
||||
logger.success(f"成功加载配置文件: {config_path}")
|
||||
|
||||
Reference in New Issue
Block a user