comparison piecrust/rendering.py @ 858:58e28ba02fb7

refactor: Fix a few more pieces of code using the old APIs.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 08 Jun 2017 08:50:33 -0700
parents 08e02c2a2a1a
children d1095774bfcf
comparison
equal deleted inserted replaced
857:d231a10d18f9 858:58e28ba02fb7
346 with page.app.env.stats.timerScope( 346 with page.app.env.stats.timerScope(
347 engine.__class__.__name__ + '_layout'): 347 engine.__class__.__name__ + '_layout'):
348 output = engine.renderFile(full_names, layout_data) 348 output = engine.renderFile(full_names, layout_data)
349 except TemplateNotFoundError as ex: 349 except TemplateNotFoundError as ex:
350 logger.exception(ex) 350 logger.exception(ex)
351 msg = "Can't find template for page: %s\n" % page.path 351 msg = "Can't find template for page: %s\n" % page.content_item.spec
352 msg += "Looked for: %s" % ', '.join(full_names) 352 msg += "Looked for: %s" % ', '.join(full_names)
353 raise Exception(msg) from ex 353 raise Exception(msg) from ex
354 354
355 pass_info = cur_ctx.render_passes[PASS_RENDERING] 355 pass_info = cur_ctx.render_passes[PASS_RENDERING]
356 res = {'content': output, 'pass_info': _pickle_object(pass_info)} 356 res = {'content': output, 'pass_info': _pickle_object(pass_info)}