changeset 942:2eb4b394709c trunk

Fix bug in ASTTransformer's cloning that overwrote AST nodes name attribute instead of copy the attributes listed in ASTNode._attributes.
author hodgestar
date Sun, 03 Jul 2011 19:02:43 +0000
parents 417787b9b9a7
children 657f9ecffa3c
files genshi/template/astutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/template/astutil.py
+++ b/genshi/template/astutil.py
@@ -727,7 +727,7 @@
         clone = node.__class__()
         for name in getattr(clone, '_attributes', ()):
             try:
-                setattr(clone, 'name', getattr(node, name))
+                setattr(clone, name, getattr(node, name))
             except AttributeError:
                 pass
         for name in clone._fields:
Copyright (C) 2012-2017 Edgewall Software