From 47a506fb8d6c654bcc1e66ea0eac6e38f0890ea6 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 6 May 2008 12:17:23 +0200 Subject: [PATCH] Fixed bug that caused "for item in seq if expr" to fail if the loop is not accessing loop --HG-- branch : trunk --- jinja2/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jinja2/compiler.py b/jinja2/compiler.py index e3b9e53..8b4abf6 100644 --- a/jinja2/compiler.py +++ b/jinja2/compiler.py @@ -813,7 +813,7 @@ class CodeGenerator(NodeVisitor): # tests in not extended loops become a continue if not extended_loop and node.test is not None: self.indent() - self.writeline('if ') + self.writeline('if not ') self.visit(node.test, loop_frame) self.write(':') self.indent() -- 2.26.2