# HG changeset patch # User Ludovic Chabant # Date 1496937033 25200 # Node ID 58e28ba02fb7796fb57126a96d21a62827de7b23 # Parent d231a10d18f9eb0b44a88cdd6b5f146387d6cf4a refactor: Fix a few more pieces of code using the old APIs. diff -r d231a10d18f9 -r 58e28ba02fb7 piecrust/rendering.py --- a/piecrust/rendering.py Thu Jun 08 08:49:33 2017 -0700 +++ b/piecrust/rendering.py Thu Jun 08 08:50:33 2017 -0700 @@ -348,7 +348,7 @@ output = engine.renderFile(full_names, layout_data) except TemplateNotFoundError as ex: logger.exception(ex) - msg = "Can't find template for page: %s\n" % page.path + msg = "Can't find template for page: %s\n" % page.content_item.spec msg += "Looked for: %s" % ', '.join(full_names) raise Exception(msg) from ex diff -r d231a10d18f9 -r 58e28ba02fb7 piecrust/templating/jinja/extensions.py --- a/piecrust/templating/jinja/extensions.py Thu Jun 08 08:49:33 2017 -0700 +++ b/piecrust/templating/jinja/extensions.py Thu Jun 08 08:50:33 2017 -0700 @@ -128,9 +128,8 @@ def _cache_support(self, name, caller): key = self.environment.piecrust_cache_prefix + name - exc_stack = self.environment.app.env.exec_info_stack - render_ctx = exc_stack.current_page_info.render_ctx - rdr_pass = render_ctx.current_pass_info + rcs = self.environment.app.env.render_ctx_stack + rdr_pass = rcs.current_ctx.current_pass_info # try to load the block from the cache # if there is no fragment in the cache, render it and store