mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-28 03:00:16 +00:00
fixed bug from duplicate append methods in stanzabase
This commit is contained in:
parent
6e1aa0690f
commit
5345e9a46b
1 changed files with 6 additions and 1 deletions
|
@ -2,6 +2,8 @@ from xml.etree import cElementTree as ET
|
||||||
import logging
|
import logging
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
xmltester = type(ET.Element('xml'))
|
||||||
|
|
||||||
class JID(object):
|
class JID(object):
|
||||||
def __init__(self, jid):
|
def __init__(self, jid):
|
||||||
self.jid = jid
|
self.jid = jid
|
||||||
|
@ -62,7 +64,10 @@ class ElementBase(object):
|
||||||
|
|
||||||
def append(self, item):
|
def append(self, item):
|
||||||
if not isinstance(item, ElementBase):
|
if not isinstance(item, ElementBase):
|
||||||
raise TypeError
|
if type(item) == xmltester:
|
||||||
|
return self.appendxml(item)
|
||||||
|
else:
|
||||||
|
raise TypeError
|
||||||
self.xml.append(item.xml)
|
self.xml.append(item.xml)
|
||||||
self.iterables.append(item)
|
self.iterables.append(item)
|
||||||
return self
|
return self
|
||||||
|
|
Loading…
Reference in a new issue