Skip to content
Snippets Groups Projects
Commit d9d5f5a8 authored by Liorithiel's avatar Liorithiel
Browse files

Fixed last fix.

parent 4b97edde
No related branches found
No related tags found
No related merge requests found
......@@ -74,7 +74,7 @@ def __init__(self, tag=None, attrs={}, payload=[], parent=None, node=None):
if self.parent and not self.namespace: self.namespace=self.parent.namespace
for attr in attrs.keys():
self.attrs[attr]=attrs[attr]
if isinstance(payload, basestring)
if isinstance(payload, basestring): payload=[payload]
for i in payload:
if isinstance(i, Node): self.addChild(node=i)
else: self.data.append(ustr(i))
......@@ -130,7 +130,7 @@ def delAttr(self, key):
def delChild(self, node, attrs={}):
""" Deletes the "node" from the node's childs list, if "node" is an instance.
Else deletes the first node that have specified name and (optionally) attributes. """
if type(node)<>type(self): node=self.getTag(node,attrs)
if not isinstance(node, Node): node=self.getTag(node,attrs)
self.kids.remove(node)
return node
def getAttrs(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment