修复项目主要错误
This commit is contained in:
@@ -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):
|
||||
"""保存验证器缓存数据"""
|
||||
|
||||
Reference in New Issue
Block a user