mirror of https://github.com/Mai-with-u/MaiBot.git
fix(config): 添加对 identity_detail 字段的非空校验
- 在配置文件加载过程中,增加了对 [identity] 部分的 identity_detail 字段的非空检查 - 如果 identity_detail 为空字符串,将抛出 ValueError 异常pull/727/head
parent
30ede5612b
commit
327dff6028
|
|
@ -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}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue