From 7acfdfc02f28fc5f164cb92cc66b7066a5405765 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Tue, 8 Dec 2009 17:43:13 +0100 Subject: [PATCH] [dm] prevent traceback when pressing DEL on the merged account row. Fixes #5498 --- src/roster_window.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 4191702e42..a2685367d4 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3071,6 +3071,9 @@ class RosterWindow: return type_ = model[list_of_paths[0]][C_TYPE] account = model[list_of_paths[0]][C_ACCOUNT].decode('utf-8') + if type_ in ('account', 'group', 'self_contact') or \ + account == gajim.ZEROCONF_ACC_NAME: + return list_ = [] for path in list_of_paths: if model[path][C_TYPE] != type_: @@ -3080,9 +3083,6 @@ class RosterWindow: contact = gajim.contacts.get_contact_with_highest_priority(account, jid) list_.append((contact, account)) - if type_ in ('account', 'group', 'self_contact') or \ - account == gajim.ZEROCONF_ACC_NAME: - return if type_ == 'contact': self.on_req_usub(widget, list_) elif type_ == 'agent': -- GitLab