1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

fix for code validation

This commit is contained in:
Peter Bieringer 2024-03-02 07:42:39 +01:00
parent cc2e1553d3
commit 551b5c2272
5 changed files with 10 additions and 5 deletions

View file

@ -95,7 +95,8 @@ class CollectionPartSync(CollectionPartCache, CollectionPartHistory,
self._storage._makedirs_synced(token_folder)
try:
# Race: Other processes might have created and locked the file.
with self._atomic_write(token_path, "wb") as fo: # type: ignore # for now, TODO fix for "mypy"
# TODO: better fix for "mypy"
with self._atomic_write(token_path, "wb") as fo: # type: ignore
fb = cast(BinaryIO, fo)
pickle.dump(state, fb)
except PermissionError: