Fixed a traceback. Not sure how correct the contact=contact[0] is, but it handles the multiple return types from get_contact_from_full_jid

This commit is contained in:
Travis Shirk 2007-06-29 21:19:47 +00:00
parent fd03586f2c
commit 6ca2d76cba
1 changed files with 3 additions and 1 deletions

View File

@ -246,8 +246,10 @@ class ConnectionCaps(object):
capscache.preload(con, jid, node, ver, exts)
contact=gajim.contacts.get_contact_from_full_jid(self.name, jid)
if contact is None:
if contact in [None, []]:
return # TODO: a way to put contact not-in-roster into Contacts
elif isinstance(contact, list):
contact = contact[0]
# overwriting old data
contact.caps_node=node