summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorJay Farrimond <jay@instaedu.com>2012-07-06 13:50:15 -0700
committerLance Stout <lancestout@gmail.com>2012-07-06 14:03:41 -0700
commit4a4a03858e87df15b0722e1c8951d5b8592a346a (patch)
treee4b30b9ffc6db09917cbe08019b1a0c2425ff255 /sleekxmpp
parent6819b57353cd7d2f7f7b2b31fb849f1c0a566f00 (diff)
downloadslixmpp-4a4a03858e87df15b0722e1c8951d5b8592a346a.tar.gz
slixmpp-4a4a03858e87df15b0722e1c8951d5b8592a346a.tar.bz2
slixmpp-4a4a03858e87df15b0722e1c8951d5b8592a346a.tar.xz
slixmpp-4a4a03858e87df15b0722e1c8951d5b8592a346a.zip
dereference iq stanza only once for roster processing
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/clientxmpp.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index 7f606de7..03070b06 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -270,8 +270,9 @@ class ClientXMPP(BaseXMPP):
roster = self.client_roster
if iq['roster']['ver']:
roster.version = iq['roster']['ver']
- for jid in iq['roster']['items']:
- item = iq['roster']['items'][jid]
+ items = iq['roster']['items']
+ for jid in items:
+ item = items[jid]
roster[jid]['name'] = item['name']
roster[jid]['groups'] = item['groups']
roster[jid]['from'] = item['subscription'] in ['from', 'both']