# HG changeset patch # User Ludovic Chabant # Date 1435385995 25200 # Node ID f4b7c8f183a4325690dce209f46aa9f664105af8 # Parent 3b658190c02ba3807446ca67f976f3616ddb381e templating: Fix Pystache template engine. diff -r 3b658190c02b -r f4b7c8f183a4 piecrust/templating/pystacheengine.py --- a/piecrust/templating/pystacheengine.py Fri Jun 26 09:51:06 2015 -0700 +++ b/piecrust/templating/pystacheengine.py Fri Jun 26 23:19:55 2015 -0700 @@ -1,5 +1,6 @@ import logging import pystache +import pystache.common from piecrust.templating.base import ( TemplateEngine, TemplateNotFoundError, TemplatingError) @@ -18,9 +19,9 @@ self._ensureLoaded() try: return self.renderer.render(txt, data) - except pystache.TemplateNotFoundError as ex: + except pystache.common.TemplateNotFoundError as ex: raise TemplateNotFoundError() from ex - except pystache.PystacheError as ex: + except pystache.common.PystacheError as ex: raise TemplatingError(str(ex), filename) from ex def renderFile(self, paths, data): @@ -45,7 +46,7 @@ try: return self.renderer.render(tpl, data) - except pystache.PystacheError as ex: + except pystache.common.PystacheError as ex: raise TemplatingError(str(ex)) from ex def _ensureLoaded(self):