From c1cd6224b8614335bb04d36699876211843f558a Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 1 May 2011 13:15:51 +0200 Subject: [PATCH] Allow the Python version to take in arbitrary list-like objects, such as generators, where a list would be expected (iteration). Patch from Morten Minde Neergaard. --- python/xmltemplate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/xmltemplate.py b/python/xmltemplate.py index b24d764..182b8e4 100644 --- a/python/xmltemplate.py +++ b/python/xmltemplate.py @@ -63,7 +63,7 @@ def process(node, obj, clean = True): if not processed: process(child, obj, clean) - elif isinstance(obj, list): # repeat + elif hasattr(obj, '__iter__'): # repeat doc = _get_document_element(node) frag = doc.createElement("temporary-fragment") # ugh -- 2.39.2