Catch UnpicklingError in Cache.read

This commit is contained in:
Thor77 2018-02-05 15:49:49 +01:00
parent c6a8bea31e
commit c32ed0360f
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class Cache(MutableMapping):
with open(path, 'rb') as f:
try:
data = pickle.load(f)
except EOFError:
except EOFError or pickle.UnpicklingError:
logger.debug('Couldn\'t read cache')
return cls(path, data)