X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fsp%2Fcons.py;h=b9437bf16e23a4f3a06d5def19095683e2fca3d6;hb=HEAD;hp=4ae21b84e03adfe39d25c678e724743f1a119262;hpb=1273171c643351d41f6d4fbf90f236432d005fc6;p=wrw.git diff --git a/wrw/sp/cons.py b/wrw/sp/cons.py index 4ae21b8..b9437bf 100644 --- a/wrw/sp/cons.py +++ b/wrw/sp/cons.py @@ -1,4 +1,4 @@ -import sys, collections +import sys, collections.abc import xml.dom.minidom class node(object): @@ -63,12 +63,12 @@ class context(object): return new = self.nodefrom(child) if new is not None: - node.children.append(self.nodefrom(child)) - elif isinstance(child, collections.Iterable): + 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: