changeset 428:f4b7c8f183a4

templating: Fix Pystache template engine.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 26 Jun 2015 23:19:55 -0700
parents 3b658190c02b
children ca5a3c970263
files piecrust/templating/pystacheengine.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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):