diff frontends/src/quick_frontend/quick_contact_list.py @ 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 02d21a589be2
children 20fb71b656e3
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