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.
This commit is contained in:
1 parent
6f5c6f5404
commit
d25202d94e
1 file changed
+2
@@ -320,6 +320,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))
|
||||
|
||||
|
||||
Reference in new issue
Block a user