summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/roster.py
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-03-26 13:55:03 -0700
committerNathan Fritz <nathan@andyet.net>2010-03-26 13:55:03 -0700
commit0fc9072e5d0ebd90339e2a809ead8ec8b15f6d7e (patch)
tree34e05aef9ba6a5ae007ceefb43c2d2051f3abeaa /sleekxmpp/stanza/roster.py
parent0659ddeff07b33d3f5e2c21cf9378dfc091386f1 (diff)
downloadslixmpp-0fc9072e5d0ebd90339e2a809ead8ec8b15f6d7e.tar.gz
slixmpp-0fc9072e5d0ebd90339e2a809ead8ec8b15f6d7e.tar.bz2
slixmpp-0fc9072e5d0ebd90339e2a809ead8ec8b15f6d7e.tar.xz
slixmpp-0fc9072e5d0ebd90339e2a809ead8ec8b15f6d7e.zip
fixed bug #16 Roster not updating
Diffstat (limited to 'sleekxmpp/stanza/roster.py')
-rw-r--r--sleekxmpp/stanza/roster.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sleekxmpp/stanza/roster.py b/sleekxmpp/stanza/roster.py
index 21aaa161..d8b61a5b 100644
--- a/sleekxmpp/stanza/roster.py
+++ b/sleekxmpp/stanza/roster.py
@@ -1,10 +1,12 @@
from .. xmlstream.stanzabase import ElementBase, ET, JID
+import logging
class Roster(ElementBase):
namespace = 'jabber:iq:roster'
name = 'query'
plugin_attrib = 'roster'
interfaces = set(('items',))
+ sub_interfaces = set()
def setItems(self, items):
self.delItems()
@@ -27,8 +29,8 @@ class Roster(ElementBase):
items = {}
itemsxml = self.xml.findall('{jabber:iq:roster}item')
if itemsxml is not None:
- item = {}
for itemxml in itemsxml:
+ item = {}
item['name'] = itemxml.get('name', '')
item['subscription'] = itemxml.get('subscription', '')
item['groups'] = []
@@ -36,7 +38,7 @@ class Roster(ElementBase):
if groupsxml is not None:
for groupxml in groupsxml:
item['groups'].append(groupxml.text)
- items[JID(itemxml.get('jid'))] = item
+ items[itemxml.get('jid')] = item
return items
def delItems(self):