fix a tb for contacts that have EXTVAL in vcard
This commit is contained in:
parent
554a9142b1
commit
c3012b4ec6
|
@ -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'''
|
||||
|
|
Loading…
Reference in New Issue