# HG changeset patch # User Ludovic Chabant # Date 1424848703 28800 # Node ID 74bea91c9630b01dac63e0f966d30266127b6a4c # Parent a68e207ca40698ac257754f1ad2f5a5bf6f7c5bd bake: Don't store internal config values in the bake record. We sometimes store actual objects in the page config (like for instance page linkers) and we don't want that to be pickled. diff -r a68e207ca406 -r 74bea91c9630 piecrust/baking/single.py --- a/piecrust/baking/single.py Tue Feb 24 22:07:11 2015 -0800 +++ b/piecrust/baking/single.py Tue Feb 24 23:18:23 2015 -0800 @@ -17,6 +17,14 @@ logger = logging.getLogger(__name__) +def copy_public_page_config(config): + res = config.get().copy() + for k in list(res.keys()): + if k.startswith('__'): + del res[k] + return res + + class BakingError(Exception): pass @@ -98,7 +106,7 @@ has_more_subs = True force_this = self.force invalidate_formatting = False - record_entry.config = page.config.get().copy() + record_entry.config = copy_public_page_config(page.config) prev_record_entry = self.record.getPreviousEntry( factory.source.name, factory.rel_path, taxonomy_name, taxonomy_term)