]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Force missing to be a local
authorArmin Ronacher <armin.ronacher@active-4.com>
Mon, 2 Jan 2017 20:39:34 +0000 (21:39 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Tue, 3 Jan 2017 22:45:29 +0000 (23:45 +0100)
jinja2/compiler.py

index 04569f3a866e5f7c08f1468c21cf9a3284da2fef..fa2c2aeaf055c01d6bb55a82f7a9459260135a73 100644 (file)
@@ -581,7 +581,8 @@ class CodeGenerator(NodeVisitor):
         self.writeline('name = %r' % self.name)
 
         # generate the root render function.
-        self.writeline('%s(context%s):' % (self.func('root'), envenv), extra=1)
+        self.writeline('%s(context, missing=missing%s):' %
+                       (self.func('root'), envenv), extra=1)
         self.indent()
 
         # process the root
@@ -614,7 +615,8 @@ class CodeGenerator(NodeVisitor):
 
         # at this point we now have the blocks collected and can visit them too.
         for name, block in iteritems(self.blocks):
-            self.writeline('%s(context%s):' % (self.func('block_' + name), envenv),
+            self.writeline('%s(context, missing=missing%s):' %
+                           (self.func('block_' + name), envenv),
                            block, 1)
             self.indent()
             # It's important that we do not make this frame a child of the