diff options
author | lovesnow <houshao55@gmail.com> | 2014-02-21 10:31:04 +0800 |
---|---|---|
committer | lovesnow <houshao55@gmail.com> | 2014-02-21 10:31:04 +0800 |
commit | 34cd20339c75532db79b4fa92f34d03d44094e29 (patch) | |
tree | f167f3abfb34777c4602fc4c56ecc10b3b192a5d | |
parent | 7548f4404736a03e0a073d03e6eabe59818c3e79 (diff) | |
download | slixmpp-34cd20339c75532db79b4fa92f34d03d44094e29.tar.gz slixmpp-34cd20339c75532db79b4fa92f34d03d44094e29.tar.bz2 slixmpp-34cd20339c75532db79b4fa92f34d03d44094e29.tar.xz slixmpp-34cd20339c75532db79b4fa92f34d03d44094e29.zip |
Fix Don't process vCard avatars for MUC occupants caused TypeError
-rw-r--r-- | sleekxmpp/plugins/xep_0153/vcard_avatar.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0153/vcard_avatar.py b/sleekxmpp/plugins/xep_0153/vcard_avatar.py index 271ac995..ec1ae782 100644 --- a/sleekxmpp/plugins/xep_0153/vcard_avatar.py +++ b/sleekxmpp/plugins/xep_0153/vcard_avatar.py @@ -124,10 +124,12 @@ class XEP_0153(BasePlugin): log.debug('Could not retrieve vCard for %s' % jid) def _recv_presence(self, pres): - if pres['muc']['affiliation']: - # Don't process vCard avatars for MUC occupants - # since they all share the same bare JID. - return + try: + if pres['muc']['affiliation']: + # Don't process vCard avatars for MUC occupants + # since they all share the same bare JID. + return + except: pass if not pres.match('presence/vcard_temp_update'): self.api['set_hash'](pres['from'], args=None) |