mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-12-02 19:19:54 +00:00
fix for bug #18
This commit is contained in:
parent
d4a490e3f0
commit
95d2614f21
1 changed files with 5 additions and 1 deletions
|
@ -44,7 +44,6 @@ class ElementBase(tostring.ToString):
|
||||||
subitem = None
|
subitem = None
|
||||||
|
|
||||||
def __init__(self, xml=None, parent=None):
|
def __init__(self, xml=None, parent=None):
|
||||||
self.attrib = self # backwards compatibility hack
|
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.xml = xml
|
self.xml = xml
|
||||||
self.plugins = {}
|
self.plugins = {}
|
||||||
|
@ -57,6 +56,11 @@ class ElementBase(tostring.ToString):
|
||||||
if self.subitem is not None and child.tag == "{%s}%s" % (self.subitem.namespace, self.subitem.name):
|
if self.subitem is not None and child.tag == "{%s}%s" % (self.subitem.namespace, self.subitem.name):
|
||||||
self.iterables.append(self.subitem(xml=child, parent=self))
|
self.iterables.append(self.subitem(xml=child, parent=self))
|
||||||
|
|
||||||
|
def _getattrib(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
attrib = property(_getattrib) # backwards compatibility
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
self.idx = 0
|
self.idx = 0
|
||||||
return self
|
return self
|
||||||
|
|
Loading…
Reference in a new issue