Capture compilation errors on additional templates

Shouldn't cause the whole page not to render but log an error. Should
provide more resilience against bad plugins.
(cherry picked from commit d25202d)
This commit is contained in:
Gina Häußge 2015-07-24 12:14:00 +02:00
parent c538604cd5
commit 202f93426a

View file

@ -319,6 +319,8 @@ def _process_template_configs(name, implementation, configs, rules):
app.jinja_env.get_or_select_template(data["template"])
except TemplateNotFound:
pass
except:
_logger.exception("Error in template {}, not going to include it".format(data["template"]))
else:
includes[template_type].append(rule["to_entry"](data))