[dm] prevent traceback when pressing DEL on the merged account row. Fixes #5498

This commit is contained in:
Yann Leboulanger 2009-12-08 17:43:13 +01:00
parent 6b7f36ebd1
commit ae3a0b6db6
1 changed files with 3 additions and 3 deletions

View File

@ -3069,6 +3069,9 @@ class RosterWindow:
return return
type_ = model[list_of_paths[0]][C_TYPE] type_ = model[list_of_paths[0]][C_TYPE]
account = model[list_of_paths[0]][C_ACCOUNT].decode('utf-8') 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_ = [] list_ = []
for path in list_of_paths: for path in list_of_paths:
if model[path][C_TYPE] != type_: if model[path][C_TYPE] != type_:
@ -3078,9 +3081,6 @@ class RosterWindow:
contact = gajim.contacts.get_contact_with_highest_priority(account, contact = gajim.contacts.get_contact_with_highest_priority(account,
jid) jid)
list_.append((contact, account)) list_.append((contact, account))
if type_ in ('account', 'group', 'self_contact') or \
account == gajim.ZEROCONF_ACC_NAME:
return
if type_ == 'contact': if type_ == 'contact':
self.on_req_usub(widget, list_) self.on_req_usub(widget, list_)
elif type_ == 'agent': elif type_ == 'agent':