diff options
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 7a5ba4a1..a0a3a337 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -44,7 +44,6 @@ class ElementBase(tostring.ToString): subitem = None def __init__(self, xml=None, parent=None): - self.attrib = self # backwards compatibility hack self.parent = parent self.xml = xml 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): self.iterables.append(self.subitem(xml=child, parent=self)) + def _getattrib(self): + return self + + attrib = property(_getattrib) # backwards compatibility + def __iter__(self): self.idx = 0 return self |