diff options
author | Nathan Fritz <nathan@andyet.net> | 2010-03-24 16:03:16 -0700 |
---|---|---|
committer | Nathan Fritz <nathan@andyet.net> | 2010-03-24 16:03:16 -0700 |
commit | 95d2614f2197e56b4c2d73f1453e7c772efcd64c (patch) | |
tree | d2d1a2763437e70d6a975f9e40e9ede8eadce279 | |
parent | d4a490e3f08489af7b12943a98515b4b66e1430e (diff) | |
download | slixmpp-95d2614f2197e56b4c2d73f1453e7c772efcd64c.tar.gz slixmpp-95d2614f2197e56b4c2d73f1453e7c772efcd64c.tar.bz2 slixmpp-95d2614f2197e56b4c2d73f1453e7c772efcd64c.tar.xz slixmpp-95d2614f2197e56b4c2d73f1453e7c772efcd64c.zip |
fix for bug #18
-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 |