changeset 1731:58ecc0e2e6fc

quick_frontend: catch an exception that can occurs when using a concurrent client
author souliane <souliane@mailoo.org>
date Thu, 10 Dec 2015 10:44:04 +0100 (2015-12-10)
parents 8d7d0fbad773
children cf11cfc87ef9
files frontends/src/quick_frontend/quick_contact_list.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_contact_list.py	Wed Dec 09 03:33:30 2015 +0100
+++ b/frontends/src/quick_frontend/quick_contact_list.py	Thu Dec 10 10:44:04 2015 +0100
@@ -390,7 +390,10 @@
         except KeyError:
             log.warning(_(u"Trying to delete an unknow entity [{}]").format(entity))
         if in_roster:
-            self._roster.remove(entity_bare)
+            try:
+                self._roster.remove(entity_bare)
+            except KeyError:
+                pass  # contact has been removed already from a concurrent client?
         del self._cache[entity_bare]
         for group in groups:
             self._groups[group]['jids'].remove(entity_bare)