整合子模块

This commit is contained in:
2025-11-10 03:01:42 +08:00
parent 07dc70df93
commit 0a0fb73e52
12 changed files with 142 additions and 28 deletions

View File

@@ -16,7 +16,8 @@ class ConfigFile:
with open(self.path, 'r') as f:
try:
self.data = toml.load(f)
except toml.TomlDecodeError:
except toml.TomlDecodeError as e:
print(f"{e}")
self.data = {}
def modify(self, key: str, value: typing.Any):