Fixed bug that caused "for item in seq if expr" to fail if the loop is not accessing...
authorArmin Ronacher <armin.ronacher@active-4.com>
Tue, 6 May 2008 10:17:23 +0000 (12:17 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Tue, 6 May 2008 10:17:23 +0000 (12:17 +0200)
--HG--
branch : trunk

jinja2/compiler.py

index e3b9e53305003a996bb000af9ffdcfd1d781a4fe..8b4abf6e655947032424343fe04f578807373a81 100644 (file)
@@ -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()