From d9d5f5a841277bd95752d2a1d90aea94d771c402 Mon Sep 17 00:00:00 2001 From: Tomasz Melcer Date: Sat, 18 Nov 2006 21:04:24 +0000 Subject: [PATCH] Fixed last fix. --- src/common/xmpp/simplexml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/xmpp/simplexml.py b/src/common/xmpp/simplexml.py index e294a756f..014134e83 100644 --- a/src/common/xmpp/simplexml.py +++ b/src/common/xmpp/simplexml.py @@ -74,7 +74,7 @@ class Node(object): 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 @@ class Node(object): 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):