From ae3a0b6db60fe0bbe98ef72c93f75817a2b56b0d Mon Sep 17 00:00:00 2001 From: Yann Leboulanger 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 49c01fadf..b9b111a74 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3069,6 +3069,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_: @@ -3078,9 +3081,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':