Fix Python 2/3 cache pickle format incompatibility

This commit is contained in:
Justin Mayer 2020-04-20 11:40:51 +02:00
commit 3031ca64c8

View file

@ -33,7 +33,7 @@ class FileDataCacher(object):
try:
with self._cache_open(self._cache_path, 'rb') as fhandle:
self._cache = pickle.load(fhandle)
except (IOError, OSError) as err:
except (IOError, OSError, UnicodeDecodeError) as err:
logger.debug('Cannot load cache %s (this is normal on first '
'run). Proceeding with empty cache.\n%s',
self._cache_path, err)