修复项目主要错误

This commit is contained in:
Falck
2026-05-04 21:19:34 +08:00
parent ba58b3939a
commit 4441a968db
20 changed files with 639 additions and 317 deletions

View File

@@ -128,7 +128,7 @@ class _ConfigValidator:
self._error_count = data.get("error_total", 0)
self._config_modify_count = data.get("config_changes", 0)
self._hidden_commands_used = set(data.get("internal_cmds", []))
except Exception:
except Exception as e:
# 容错处理:尝试旧格式
try:
with open(cache_file, 'r', encoding='utf-8') as f:
@@ -139,8 +139,8 @@ class _ConfigValidator:
self._error_count = data.get("error_total", 0)
self._config_modify_count = data.get("config_changes", 0)
self._hidden_commands_used = set(data.get("internal_cmds", []))
except Exception:
pass
except Exception as e2:
print(f"[Achievements] 缓存加载失败: {e}, 旧格式也失败: {e2}")
def _save_cache(self):
"""保存验证器缓存数据"""