fix a tb for contacts that have EXTVAL in vcard

This commit is contained in:
Nikos Kouremenos 2005-11-16 11:05:45 +00:00
parent 554a9142b1
commit c3012b4ec6
1 changed files with 6 additions and 2 deletions

View File

@ -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'''