mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #2904 from GiovanH/pickle-typeerror
Pickle.dump can raise TypeError (e.g. generators)
This commit is contained in:
commit
24aefd3b1b
1 changed files with 1 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ class FileDataCacher:
|
||||||
mkdir_p(self.settings['CACHE_PATH'])
|
mkdir_p(self.settings['CACHE_PATH'])
|
||||||
with self._cache_open(self._cache_path, 'wb') as fhandle:
|
with self._cache_open(self._cache_path, 'wb') as fhandle:
|
||||||
pickle.dump(self._cache, fhandle)
|
pickle.dump(self._cache, fhandle)
|
||||||
except (OSError, pickle.PicklingError) as err:
|
except (OSError, pickle.PicklingError, TypeError) as err:
|
||||||
logger.warning('Could not save cache %s\n ... %s',
|
logger.warning('Could not save cache %s\n ... %s',
|
||||||
self._cache_path, err)
|
self._cache_path, err)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue