fix #421
This commit is contained in:
parent
53cfc5a79c
commit
ad19f954ac
2 changed files with 4 additions and 2 deletions
|
@ -122,6 +122,8 @@ class Tabbed_chat_window(chat.Chat):
|
||||||
def set_avatar(self, vcard):
|
def set_avatar(self, vcard):
|
||||||
if not vcard.has_key('PHOTO'):
|
if not vcard.has_key('PHOTO'):
|
||||||
return
|
return
|
||||||
|
if type(vcard['PHOTO']) != type({}):
|
||||||
|
return
|
||||||
img_decoded = None
|
img_decoded = None
|
||||||
if vcard['PHOTO'].has_key('BINVAL'):
|
if vcard['PHOTO'].has_key('BINVAL'):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -135,10 +135,10 @@ class Vcard_window:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def set_values(self, vcard):
|
def set_values(self, vcard):
|
||||||
if not type(vcard[i]) == type({}):
|
|
||||||
return
|
|
||||||
for i in vcard.keys():
|
for i in vcard.keys():
|
||||||
if i == 'PHOTO':
|
if i == 'PHOTO':
|
||||||
|
if not type(vcard[i]) == type({}):
|
||||||
|
continue
|
||||||
img_decoded = None
|
img_decoded = None
|
||||||
if vcard[i].has_key('BINVAL') and vcard[i].has_key('TYPE'):
|
if vcard[i].has_key('BINVAL') and vcard[i].has_key('TYPE'):
|
||||||
img_encoded = vcard[i]['BINVAL']
|
img_encoded = vcard[i]['BINVAL']
|
||||||
|
|
Loading…
Add table
Reference in a new issue