From 1ee309516709816c3122844bc502255f0a596e60 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 18 Oct 2007 22:33:45 +0200 Subject: [PATCH] iteration over old style class that have no length should work now --HG-- branch : trunk --- jinja/datastructure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jinja/datastructure.py b/jinja/datastructure.py index f4887b3..d265d8d 100644 --- a/jinja/datastructure.py +++ b/jinja/datastructure.py @@ -345,7 +345,7 @@ class LoopContext(object): else: try: length = len(seq) - except TypeError: + except (AttributeError, TypeError): seq = list(seq) length = len(seq) self._stack.append({ -- 2.26.2