1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-20 22:35:35 +08:00

Opt: Reduce config writes

This commit is contained in:
LmeSzinc
2022-06-06 23:42:24 +08:00
parent 151ab28fae
commit 3a0b5d5536
4 changed files with 14 additions and 14 deletions

View File

@@ -228,7 +228,7 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
logger.info(f'Save config {filepath_config(self.config_name)}, {dict_to_kv(self.modified)}')
# Don't use self.modified = {}, that will create a new object.
self.modified.clear()
write_file(filepath_config(self.config_name), data=self.data)
self.write_file(self.config_name, data=self.data)
def update(self):
self.load()