mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-22 17:36:15 +00:00
fix save
This commit is contained in:
+1
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user