Browse Source

Added error info to log for debuggin purposes

main
Lakshmi Vyasarajan 13 years ago
parent
commit
2a9e77a4bd
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      hyde/ext/templates/jinja.py

+ 5
- 1
hyde/ext/templates/jinja.py View File

@@ -599,7 +599,11 @@ class Jinja2Template(Template):
""" """
text = self.env.loader.get_source(self.env, path)[0] text = self.env.loader.get_source(self.env, path)[0]
from jinja2.meta import find_referenced_templates from jinja2.meta import find_referenced_templates
ast = self.env.parse(text)
try:
ast = self.env.parse(text)
except:
logger.error("Error parsing[%s]" % path)
raise
tpls = find_referenced_templates(ast) tpls = find_referenced_templates(ast)
deps = list(self.env.globals['deps'].get('path', [])) deps = list(self.env.globals['deps'].get('path', []))
for dep in tpls: for dep in tpls:


Loading…
Cancel
Save