core (memory/cache): don't crash on EOFError in getMetadata

This commit is contained in:
Goffi 2021-06-17 10:35:42 +02:00
commit 211c9c8079

View file

@ -140,7 +140,7 @@ class Cache(object):
try:
with cache_url.open("rb") as f:
cache_data = pickle.load(f)
except IOError as e:
except (IOError, EOFError) as e:
log.warning(f"can't read cache at {cache_url}: {e}")
return None
except pickle.UnpicklingError: