summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/cache/metadata_overlay.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/cache/metadata_overlay.py b/pym/cache/metadata_overlay.py
index 9320b0938..c4d18c173 100644
--- a/pym/cache/metadata_overlay.py
+++ b/pym/cache/metadata_overlay.py
@@ -6,6 +6,7 @@ import time
if not hasattr(__builtins__, "set"):
from sets import Set as set
from cache import template
+from cache.cache_errors import CacheCorruption
from cache.flat_hash import database as db_rw
from cache.metadata import database as db_ro
@@ -26,6 +27,9 @@ class database(template.database):
value = self.db_rw[cpv]
except KeyError:
return self.db_ro[cpv] # raises a KeyError when necessary
+ except CacheCorruption:
+ del self.db_rw[cpv]
+ return self.db_ro[cpv] # raises a KeyError when necessary
if self._is_whiteout(value):
if self._is_whiteout_valid(cpv, value):
raise KeyError(cpv)