mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Reset json file to default on schema error (#193)
This commit is contained in:
parent
b7820bc6a6
commit
1353d52bd1
@ -123,6 +123,8 @@ class JsonConfig(object):
|
||||
except vol.Invalid as ex:
|
||||
_LOGGER.error("Can't parse %s -> %s",
|
||||
self._file, humanize_error(self._data, ex))
|
||||
# reset data to default
|
||||
self._data = self._schema({})
|
||||
|
||||
def save(self):
|
||||
"""Store data to config file."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user