diff options
author | Lance Stout <lancestout@gmail.com> | 2012-07-06 13:58:46 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-07-06 13:58:46 -0700 |
commit | 1efe04995941933e7579efffd8f325d8c4b516ef (patch) | |
tree | 1e195f05a6a0735d14f9978fd3b32b4c26d2c1ec | |
parent | c7594b3ef02d490eceb6ae74af976a8f8263539a (diff) | |
parent | 23931489085391a97ab8b358e9da1c5c8cfb4e94 (diff) | |
download | slixmpp-1efe04995941933e7579efffd8f325d8c4b516ef.tar.gz slixmpp-1efe04995941933e7579efffd8f325d8c4b516ef.tar.bz2 slixmpp-1efe04995941933e7579efffd8f325d8c4b516ef.tar.xz slixmpp-1efe04995941933e7579efffd8f325d8c4b516ef.zip |
Merge pull request #180 from jay-instaedu/develop
dereference iq stanza only once for roster processing
-rw-r--r-- | sleekxmpp/clientxmpp.py | 5 |
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'] |