Use atomicwrites for mission critical core files (#59606)
This commit is contained in:
parent
04a258bf21
commit
96f7b0d910
19 changed files with 92 additions and 24 deletions
|
@ -162,7 +162,9 @@ class DeviceRegistry:
|
|||
def __init__(self, hass: HomeAssistant) -> None:
|
||||
"""Initialize the device registry."""
|
||||
self.hass = hass
|
||||
self._store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY)
|
||||
self._store = hass.helpers.storage.Store(
|
||||
STORAGE_VERSION, STORAGE_KEY, atomic_writes=True
|
||||
)
|
||||
self._clear_index()
|
||||
|
||||
@callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue