Commit ede055af by Carl Whittaker

Adding exception handler

parent 79817d51
...@@ -61,6 +61,9 @@ class Template(object): ...@@ -61,6 +61,9 @@ class Template(object):
it = self.view.get(section_name, None) it = self.view.get(section_name, None)
replacer = '' replacer = ''
# Exception
if it and isinstance(it, Exception):
raise it
# Callable # Callable
if it and isinstance(it, collections.Callable): if it and isinstance(it, collections.Callable):
replacer = it(inner) replacer = it(inner)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment