summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
authorNathan Fritz <fritz@netflint.net>2010-01-14 07:37:44 -0800
committerNathan Fritz <fritz@netflint.net>2010-01-14 07:37:44 -0800
commit5345e9a46ba6b862944bcddacd73fba448758109 (patch)
tree76d26ce0e1b1dc79cf366ac14c9bd70168ec4146 /sleekxmpp/xmlstream/stanzabase.py
parent6e1aa0690f4c2bcc1031aed05305ef84f36fbb57 (diff)
downloadslixmpp-5345e9a46ba6b862944bcddacd73fba448758109.tar.gz
slixmpp-5345e9a46ba6b862944bcddacd73fba448758109.tar.bz2
slixmpp-5345e9a46ba6b862944bcddacd73fba448758109.tar.xz
slixmpp-5345e9a46ba6b862944bcddacd73fba448758109.zip
fixed bug from duplicate append methods in stanzabase
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py7
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