check if all fiels for the photo are in vcard

This commit is contained in:
Yann Leboulanger 2005-06-07 14:31:10 +00:00
parent 36a5469ccc
commit 9918b17e2f
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ class Vcard_window:
for i in vcard.keys(): for i in vcard.keys():
if i == 'PHOTO': if i == 'PHOTO':
img_decoded = None img_decoded = None
if vcard[i].has_key('BINVAL'): if vcard[i].has_key('BINVAL') and vcard[i].has_key('TYPE'):
img_encoded = vcard[i]['BINVAL'] img_encoded = vcard[i]['BINVAL']
self.avatar_encoded = img_encoded self.avatar_encoded = img_encoded
self.avatar_mime_type = vcard[i]['TYPE'] self.avatar_mime_type = vcard[i]['TYPE']