Skip to content
Snippets Groups Projects
Commit ad19f954 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

fix #421

parent 53cfc5a7
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,8 @@ class Tabbed_chat_window(chat.Chat):
def set_avatar(self, vcard):
if not vcard.has_key('PHOTO'):
return
if type(vcard['PHOTO']) != type({}):
return
img_decoded = None
if vcard['PHOTO'].has_key('BINVAL'):
try:
......
......@@ -135,10 +135,10 @@ class Vcard_window:
pass
def set_values(self, vcard):
if not type(vcard[i]) == type({}):
return
for i in vcard.keys():
if i == 'PHOTO':
if not type(vcard[i]) == type({}):
continue
img_decoded = None
if vcard[i].has_key('BINVAL') and vcard[i].has_key('TYPE'):
img_encoded = vcard[i]['BINVAL']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment