changeset 1983:8c4087fd034a

quick_frontend: allow presence of entities without resource
author Goffi <goffi@goffi.org>
date Wed, 29 Jun 2016 13:42:35 +0200
parents e6b51b7ff31f
children de4fac507dc4
files frontends/src/quick_frontend/quick_contact_list.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_contact_list.py	Tue Jun 28 18:37:29 2016 +0200
+++ b/frontends/src/quick_frontend/quick_contact_list.py	Wed Jun 29 13:42:35 2016 +0200
@@ -471,7 +471,8 @@
                 if not cache[C.CONTACT_RESOURCES]:
                     cache[C.CONTACT_MAIN_RESOURCE] = None
         else:
-            assert entity.resource
+            if not entity.resource:
+                log.warning(_(u"received presence from entity without resource: {}".format(entity)))
             resources_data = cache[C.CONTACT_RESOURCES]
             resource_data = resources_data.setdefault(entity.resource, {})
             resource_data[C.PRESENCE_SHOW] = show