Permalink
Browse files

Outdent only if raise has been indented in multiple inheritance error…

… handling. Fixes #79
  • Loading branch information...
paradoxxxzero committed Jan 5, 2012
1 parent 80b4fe6 commit 4b2e99f8a0ee4d12f748fb56b37f4166c260f7e3
Showing with 3 additions and 2 deletions.
  1. +3 −2 jinja2/compiler.py
View
@@ -894,12 +894,13 @@ def visit_Extends(self, node, frame):
self.indent()
self.writeline('raise TemplateRuntimeError(%r)' %
'extended multiple times')
- self.outdent()
- # if we have a known extends already we don't need that code here
+ # if we have a known extends already we don't need that code here
# as we know that the template execution will end here.
if self.has_known_extends:
raise CompilerExit()
+ else:
+ self.outdent()
self.writeline('parent_template = environment.get_template(', node)
self.visit(node.template, frame)

0 comments on commit 4b2e99f

Please sign in to comment.