diff --git a/ckan/lib/base.py b/ckan/lib/base.py index a91a1170135..cf5cf031f76 100644 --- a/ckan/lib/base.py +++ b/ckan/lib/base.py @@ -104,7 +104,10 @@ def render_template(): # we remove it so any bad templates crash and burn del globs['url'] - template_path, template_type = render_.template_info(template_name) + try: + template_path, template_type = render_.template_info(template_name) + except render_.TemplateNotFound: + raise # snippets should not pass the context # but allow for legacy genshi templates @@ -202,6 +205,8 @@ def render_template(): raise ckan.exceptions.CkanUrlException( '\nAn Exception has been raised for template %s\n%s' % (template_name, e.message)) + except render_.TemplateNotFound: + raise class ValidationException(Exception):