summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream')
-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