Author: asterix Date: 2007-08-21 11:23:34 +0200 (Tue, 21 Aug 2007) New Revision: 8528
Modified: trunk/src/common/contacts.py Log: Fix TB when getting score of a not (yet) in the roster contact. fixes #3382 and #3335
Modified: trunk/src/common/contacts.py =================================================================== --- trunk/src/common/contacts.py 2007-08-21 00:43:58 UTC (rev 8527) +++ trunk/src/common/contacts.py 2007-08-21 09:23:34 UTC (rev 8528) @@ -431,9 +431,12 @@ for data_ in family: if data_.has_key('order') and data_['order'] > max_order: max_order = data_['order'] + score = (max_order - order)*10000 + contact = self.get_contact_with_highest_priority(account, jid) - score = (max_order - order)*10000 - + if not contact: + return score + if common.gajim.get_transport_name_from_jid(jid) is None and \ contact.show not in ('error', 'offline'): score += 10