hack handle key miss

This commit is contained in:
Jörn-Michael Miehe 2023-09-11 03:12:24 +00:00
parent 4415c0f861
commit 02cb654022

View file

@ -71,8 +71,14 @@ class WebDAV:
cls._webdav_client.resource(path).read_from(buffer) cls._webdav_client.resource(path).read_from(buffer)
# Cache-Eintrag entfernen (hack: siehe AsyncTTL._TTL.__contains__) try:
del cls._rb_ttl.ttl[KEY((path,), {})] # hack: zugehörigen Cache-Eintrag entfernen
# -> AsyncTTL._TTL.__contains__
del cls._rb_ttl.ttl[KEY((path,), {})]
except KeyError:
# Cache-Eintrag existierte nicht
pass
@classmethod @classmethod
async def write_str(cls, path: str, content: str, encoding="utf-8") -> None: async def write_str(cls, path: str, content: str, encoding="utf-8") -> None: