This commit is contained in:
Florian Bezannier
2021-11-22 23:19:44 +01:00
parent 61f0d79d91
commit d4bd8de706
+1 -1
View File
@@ -123,7 +123,7 @@ class ChargeControls(dict):
config_str = json.dumps(chd, sort_keys=True, indent=4).encode('utf-8')
new_hash = md5(config_str).hexdigest()
if force or self._config_hash != new_hash:
with open(self.file_name, "wb", encoding="utf-8") as f:
with open(self.file_name, "wb") as f:
f.write(config_str)
self._config_hash = new_hash
logger.info("save config change")