Use atomicwrites for mission critical core files (#59606)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user