catch arbitrary exceptions during cache unpickling

It is hard to forsee what could be raised.
This commit is contained in:
Ondrej Grover 2014-06-08 11:32:10 +02:00
commit ef96705677

View file

@ -577,7 +577,7 @@ class FileDataCacher(object):
'run). Proceeding with empty cache.\n{}').format(
self._cache_path, err))
self._cache = {}
except pickle.UnpicklingError as err:
except Exception as err:
logger.warning(('Cannot unpickle cache {}, cache may be using '
'an incompatible protocol (see pelican caching docs). '
'Proceeding with empty cache.\n{}').format(