more of isinstance

This commit is contained in:
Nikos Kouremenos 2005-08-26 12:52:40 +00:00
parent 85c957f49d
commit 121911f8f6
1 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ class VcardWindow:
def set_values(self, vcard):
for i in vcard.keys():
if i == 'PHOTO':
if not type(vcard[i]) == type({}):
if not isinstance(vcard[i], dict):
continue
img_decoded = None
if vcard[i].has_key('BINVAL') and vcard[i].has_key('TYPE'):
@ -220,7 +220,7 @@ class VcardWindow:
add_on = '_WORK'
for j in entry.keys():
self.set_value(i + add_on + '_' + j + '_entry', entry[j])
if type(vcard[i]) == type({}):
if isinstance(vcard[i], dict):
for j in vcard[i].keys():
self.set_value(i + '_' + j + '_entry', vcard[i][j])
else: