From 211c9c8079121cc4ffaecc725a1f40841441f157 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 17 Jun 2021 10:35:42 +0200 Subject: [PATCH] core (memory/cache): don't crash on EOFError in getMetadata --- sat/memory/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sat/memory/cache.py b/sat/memory/cache.py index f7d3a347..24b237a8 100644 --- a/sat/memory/cache.py +++ b/sat/memory/cache.py @@ -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: