From 19866c99a9c48b8eeda52800076e79a6bb168cfa Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Sat, 30 Aug 2008 19:33:13 +0000 Subject: [PATCH] Do not traceback when disconnecting from a minimized groupchat. Fixes #4255. --- src/roster_window.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 2ae71ef46..3d2330c2a 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1090,11 +1090,9 @@ class RosterWindow: name = '%s' % name # Delete pep if needed - delete_pep = True - for c in contact_instances: - if c.show not in ('error', 'offline'): - delete_pep = False - if delete_pep: + keep_pep = any(c.show not in ('error', 'offline') for c in + contact_instances) + if not keep_pep and not contact.is_groupchat(): pep.delete_pep(jid, account) # Show resource counter