Commits

Andriy Kornatskyy committed 9b00f6d

Fixed issue#6: Error 'list index out of range' for empty template

  • Participants
  • Parent commits 028524a

Comments (0)

Files changed (1)

src/wheezy/template/ext/core.py

     assert token == 'render'
     if len(nodes) > 1:
         return False
+    if len(nodes) == 0:
+        builder.add(lineno, "return ''")
+        return True
     ln, token, nodes = nodes[0]
     if token != 'out' or len(nodes) > 1:
         return False