From 3031ca64c879cd25e99f8b01b81cb162ea793fec Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 20 Apr 2020 11:40:51 +0200 Subject: [PATCH] Fix Python 2/3 cache pickle format incompatibility --- pelican/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/cache.py b/pelican/cache.py index f6adbc35..7d6ee992 100644 --- a/pelican/cache.py +++ b/pelican/cache.py @@ -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)