From f396f738fb2ddbf9ba9329030e539c9f49b725b8 Mon Sep 17 00:00:00 2001 From: Toby Date: Thu, 24 May 2012 12:55:44 +0100 Subject: [PATCH] 2375 raise exception if template not found --- ckan/lib/render.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckan/lib/render.py b/ckan/lib/render.py index 7d5b465beaf..c0063b399d2 100644 --- a/ckan/lib/render.py +++ b/ckan/lib/render.py @@ -32,6 +32,8 @@ def template_info(template_name): return t_data['template_type'], t_data['template_type'] template_path = find_template(template_name) + if not template_path: + raise Exception('Template %s cannot be found' % template_name) t_type = template_type(template_path) t_data = {'template_path' : template_path,