From: Armin Ronacher Date: Tue, 6 May 2008 10:17:23 +0000 (+0200) Subject: Fixed bug that caused "for item in seq if expr" to fail if the loop is not accessing... X-Git-Tag: 2.0rc1~91 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=47a506fb8d6c654bcc1e66ea0eac6e38f0890ea6;p=jinja2.git Fixed bug that caused "for item in seq if expr" to fail if the loop is not accessing loop --HG-- branch : trunk --- 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()