Anonymous committed 75cd58a

Fixed #1531 -- Fixed eager exception catching that caused the template system to report a base template didn't exist when indeed it does exist but contains an {% include %} of a nonexisting template

Comments (0)

Files changed (1)


                 error_msg += " Got this from the %r variable." % self.parent_name_expr #TODO nice repr.
             raise TemplateSyntaxError, error_msg
-            return get_template_from_string(*find_template_source(parent, self.template_dirs))
+            source, origin = find_template_source(parent, self.template_dirs)
         except TemplateDoesNotExist:
             raise TemplateSyntaxError, "Template %r cannot be extended, because it doesn't exist" % parent
+        else:
+            return get_template_from_string(source, origin)
     def render(self, context):
         compiled_parent = self.get_parent(context)