Update HACS
This commit is contained in:
@@ -36,7 +36,7 @@ def get_store_key(key):
|
||||
|
||||
def _get_store_for_key(hass, key, encoder):
|
||||
"""Create a Store object for the key."""
|
||||
return HACSStore(hass, VERSION_STORAGE, get_store_key(key), encoder=encoder)
|
||||
return HACSStore(hass, VERSION_STORAGE, get_store_key(key), encoder=encoder, atomic_writes=True)
|
||||
|
||||
|
||||
def get_store_for_key(hass, key):
|
||||
@@ -49,16 +49,6 @@ async def async_load_from_store(hass, key):
|
||||
return await get_store_for_key(hass, key).async_load() or {}
|
||||
|
||||
|
||||
async def async_save_to_store_default_encoder(hass, key, data):
|
||||
"""Generate store json safe data to the filesystem.
|
||||
|
||||
The data is expected to be encodable with the default
|
||||
python json encoder. It should have already been passed through
|
||||
JSONEncoder if needed.
|
||||
"""
|
||||
await _get_store_for_key(hass, key, None).async_save(data)
|
||||
|
||||
|
||||
async def async_save_to_store(hass, key, data):
|
||||
"""Generate dynamic data to store and save it to the filesystem.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user