Fixed some SP node conversion bugs.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 14 Jan 2017 19:08:45 +0000 (20:08 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 15 Jan 2017 03:23:19 +0000 (04:23 +0100)
wrw/sp/cons.py

index 8ffa397..b9437bf 100644 (file)
@@ -63,12 +63,12 @@ class context(object):
             return
         new = self.nodefrom(child)
         if new is not None:
-            node.children.append(self.nodefrom(child))
+            node.children.append(new)
         elif isinstance(child, collections.abc.Iterable):
             for ch in child:
                 self.addchild(node, ch)
         else:
-            raise Exception("No node conversion known for %s objects" % str(type(ob)))
+            raise Exception("No node conversion known for %s objects" % str(type(child)))
 
     def addattr(self, node, k, v):
         if v is not None: