Skip to content
Snippets Groups Projects
Commit b8fd8c8a authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Catch exception when parsing avatars

If the VCard contains a <PHOTO/> tag this is parsed as {'PHOTO': ''}

this throws: TypeError: string indices must be integers
parent 361ad92b
No related branches found
No related tags found
No related merge requests found
......@@ -477,7 +477,7 @@ class ConnectionVcard:
def _get_vcard_photo(self, vcard, jid):
try:
photo = vcard['PHOTO']['BINVAL']
except (KeyError, AttributeError):
except (KeyError, AttributeError, TypeError):
avatar_sha = None
photo_decoded = None
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment