changeset 21:64ae0d2f402b

fix breakages
author egj@egj-laptop
date Sun, 03 Jan 2010 15:39:55 -0500
parents c17595c824a7
children a8d36caa8f09
files decoupage/web.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/decoupage/web.py	Sun Jan 03 15:36:14 2010 -0500
+++ b/decoupage/web.py	Sun Jan 03 15:39:55 2010 -0500
@@ -8,6 +8,7 @@
 
 from genshi.builder import Markup
 from genshi.template import TemplateLoader
+from genshi.template.base import TemplateError
 from martini.config import ConfigMunger
 from paste.fileapp import FileApp
 from pkg_resources import resource_filename
@@ -141,10 +142,10 @@
                     else:
                         raise IOError("template %s not found" % template)
                 
-        template = self.loader.load(template)
         try:
+            template = self.loader.load(template)
             res = template.generate(**data).render('html', doctype='html')
-        except TemplateSyntaxError:
+        except TemplateError:
             if local_index:
                 return self.fileserver(local_index)
             raise