Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_contact_list.py @ 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 |
parents | 683b76c1145d |
children | baac0fc5e3ad |
comparison
equal
deleted
inserted
replaced
1730:8d7d0fbad773 | 1731:58ecc0e2e6fc |
---|---|
388 try: | 388 try: |
389 groups = self._cache[entity_bare].get(C.CONTACT_GROUPS, set()) | 389 groups = self._cache[entity_bare].get(C.CONTACT_GROUPS, set()) |
390 except KeyError: | 390 except KeyError: |
391 log.warning(_(u"Trying to delete an unknow entity [{}]").format(entity)) | 391 log.warning(_(u"Trying to delete an unknow entity [{}]").format(entity)) |
392 if in_roster: | 392 if in_roster: |
393 self._roster.remove(entity_bare) | 393 try: |
394 self._roster.remove(entity_bare) | |
395 except KeyError: | |
396 pass # contact has been removed already from a concurrent client? | |
394 del self._cache[entity_bare] | 397 del self._cache[entity_bare] |
395 for group in groups: | 398 for group in groups: |
396 self._groups[group]['jids'].remove(entity_bare) | 399 self._groups[group]['jids'].remove(entity_bare) |
397 if not self._groups[group]['jids']: | 400 if not self._groups[group]['jids']: |
398 self._groups.pop(group) | 401 self._groups.pop(group) |