diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2005-12-09 01:39:01 +0300 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2005-12-09 01:39:01 +0300 |
commit | eda8ec8436aa60724c57c6ff48771c3de15b019c (patch) | |
tree | b9c8db188cf6dd93a2f880916f3e37d5a470d8f6 | |
parent | 425023e05c1bd81978a4a2cb3189bdce8dcc0e95 (diff) |
fix a TB: we can have a row without an account during a short time ... I don't know why
-rw-r--r-- | src/roster_window.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/roster_window.py b/src/roster_window.py index 420ae60db..923f4e7d4 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2366,7 +2366,9 @@ _('If "%s" accepts this request you will know his or her status.') %jid) jid2 = model[iter2][C_JID].decode('utf-8') # We first compare by show if sort_by_show is True if type1 == 'contact' and type2 == 'contact' and \ - gajim.config.get('sort_by_show'): + gajim.config.get('sort_by_show'): + if account1 and account2: # We an have contact without account + # during a short time ... why? luser1 = gajim.contacts[account1][jid1] luser2 = gajim.contacts[account2][jid2] cshow = {'online':0, 'chat': 1, 'away': 2, 'xa': 3, 'dnd': 4, @@ -2390,7 +2392,7 @@ _('If "%s" accepts this request you will know his or her status.') %jid) return -1 if name2.lower() < name1.lower(): return 1 - if type1 == 'contact' and type2 == 'contact': + if type1 == 'contact' and type2 == 'contact' and account1 and account2: # We compare account names if account1.lower() < account2.lower(): return -1 |