diff options
author | Nathan Fritz <fritz@netflint.net> | 2010-01-14 07:37:44 -0800 |
---|---|---|
committer | Nathan Fritz <fritz@netflint.net> | 2010-01-14 07:37:44 -0800 |
commit | 5345e9a46ba6b862944bcddacd73fba448758109 (patch) | |
tree | 76d26ce0e1b1dc79cf366ac14c9bd70168ec4146 | |
parent | 6e1aa0690f4c2bcc1031aed05305ef84f36fbb57 (diff) | |
download | slixmpp-5345e9a46ba6b862944bcddacd73fba448758109.tar.gz slixmpp-5345e9a46ba6b862944bcddacd73fba448758109.tar.bz2 slixmpp-5345e9a46ba6b862944bcddacd73fba448758109.tar.xz slixmpp-5345e9a46ba6b862944bcddacd73fba448758109.zip |
fixed bug from duplicate append methods in stanzabase
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 277882e8..00a1439a 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -2,6 +2,8 @@ from xml.etree import cElementTree as ET import logging import traceback +xmltester = type(ET.Element('xml')) + class JID(object): def __init__(self, jid): self.jid = jid @@ -62,7 +64,10 @@ class ElementBase(object): def append(self, item): if not isinstance(item, ElementBase): - raise TypeError + if type(item) == xmltester: + return self.appendxml(item) + else: + raise TypeError self.xml.append(item.xml) self.iterables.append(item) return self |