Use atomicwrites for mission critical core files (#59606)

This commit is contained in:
J. Nick Koston 2021-11-15 04:19:31 -06:00 committed by GitHub
parent 04a258bf21
commit 96f7b0d910
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 92 additions and 24 deletions

View file

@ -77,7 +77,7 @@ class TotpAuthModule(MultiFactorAuthModule):
super().__init__(hass, config)
self._users: dict[str, str] | None = None
self._user_store = hass.helpers.storage.Store(
STORAGE_VERSION, STORAGE_KEY, private=True
STORAGE_VERSION, STORAGE_KEY, private=True, atomic_writes=True
)
self._init_lock = asyncio.Lock()