comparison piecrust/templating/pystacheengine.py @ 989:8adc27285d93

bake: Big pass on bake performance. - Reduce the amount of data passed between processes. - Make inter-process data simple objects to make it easier to test with alternatives to pickle. - Make sources have the basic requirement to be able to find a content item from an item spec (path). - Make Hoedown the default Markdown formatter.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 19 Nov 2017 14:29:17 -0800
parents 1bb704434ee2
children
comparison
equal deleted inserted replaced
988:f83ae0a5d793 989:8adc27285d93
17 self._pystache_error = None 17 self._pystache_error = None
18 18
19 def renderSegment(self, path, segment, data): 19 def renderSegment(self, path, segment, data):
20 self._ensureLoaded() 20 self._ensureLoaded()
21 try: 21 try:
22 return self.renderer.render(segment.content, data) 22 return self.renderer.render(segment.content, data), True
23 except self._not_found_error as ex: 23 except self._not_found_error as ex:
24 raise TemplateNotFoundError() from ex 24 raise TemplateNotFoundError() from ex
25 except self._pystache_error as ex: 25 except self._pystache_error as ex:
26 raise TemplatingError(str(ex), path) from ex 26 raise TemplatingError(str(ex), path) from ex
27 27