Skip to content
Snippets Groups Projects
Commit c3012b4e authored by nkour's avatar nkour
Browse files

fix a tb for contacts that have EXTVAL in vcard

parent 554a9142
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,8 @@ def get_avatar_pixbuf_encoded_mime(photo):
if not isinstance(photo, dict):
return None, None, None
img_decoded = None
avatar_encoded = None
avatar_mime_type = None
if photo.has_key('BINVAL') and photo.has_key('TYPE'):
img_encoded = photo['BINVAL']
avatar_encoded = img_encoded
......@@ -61,8 +63,10 @@ def get_avatar_pixbuf_encoded_mime(photo):
except:
pass
if img_decoded:
return gtkgui_helpers.get_pixbuf_from_data(img_decoded), avatar_encoded, avatar_mime_type
return None, None, None
pixbuf = gtkgui_helpers.get_pixbuf_from_data(img_decoded)
else:
pixbuf = None
return pixbuf, avatar_encoded, avatar_mime_type
class VcardWindow:
'''Class for contact's information window'''
......
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