mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-29 16:50:02 +08:00
重构webui主页与好友/群组api
This commit is contained in:
@@ -30,7 +30,7 @@ class StaticData(Generic[T]):
|
||||
try:
|
||||
self._data: dict = json.load(f)
|
||||
except ValueError:
|
||||
if f.read().strip():
|
||||
if not f.read().strip():
|
||||
raise ValueError(f"{file} 文件加载错误,请检查文件内容格式.")
|
||||
elif file.name.endswith("yaml"):
|
||||
self._data = _yaml.load(f)
|
||||
|
||||
Reference in New Issue
Block a user