mirror of
https://github.com/vale981/ablog
synced 2025-03-06 09:41:39 -05:00
Restored automatic skipping of environment pickling.
This commit is contained in:
parent
570e046e00
commit
7ea98e41e9
1 changed files with 6 additions and 3 deletions
|
@ -228,11 +228,13 @@ def skip_pickling(env):
|
||||||
del self.config[key]
|
del self.config[key]
|
||||||
print('Trying to pickle:')
|
print('Trying to pickle:')
|
||||||
try_pickling(env)
|
try_pickling(env)
|
||||||
|
#from code import interact; interact(local=locals())
|
||||||
# reset attributes
|
# reset attributes
|
||||||
|
|
||||||
self.domains = domains
|
self.domains = domains
|
||||||
self.config.values = values
|
self.config.values = values
|
||||||
self.set_warnfunc(warnfunc)
|
self.set_warnfunc(warnfunc)
|
||||||
#from code import interact; interact(local=locals())
|
|
||||||
#try_pickling(env)
|
#try_pickling(env)
|
||||||
tried.add(id(topickle))
|
tried.add(id(topickle))
|
||||||
env.topickle = topickle
|
env.topickle = topickle
|
||||||
|
@ -245,8 +247,9 @@ def process_posts(app, doctree):
|
||||||
environment."""
|
environment."""
|
||||||
|
|
||||||
env = app.builder.env
|
env = app.builder.env
|
||||||
if os.environ.get('READTHEDOCS', None) == 'True' or 1:
|
if os.environ.get('READTHEDOCS', None):
|
||||||
skip_pickling(env)
|
env.topickle = lambda *args: env.warn('index',
|
||||||
|
'Building on Read The Docs, environment is not being pickled.')
|
||||||
if not hasattr(env, 'ablog_posts'):
|
if not hasattr(env, 'ablog_posts'):
|
||||||
env.ablog_posts = {}
|
env.ablog_posts = {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue