diff --git a/sat_frontends/quick_frontend/quick_contact_list.py b/sat_frontends/quick_frontend/quick_contact_list.py index 00e90641..836506a1 100644 --- a/sat_frontends/quick_frontend/quick_contact_list.py +++ b/sat_frontends/quick_frontend/quick_contact_list.py @@ -22,14 +22,13 @@ from sat.core.i18n import _ from sat.core.log import getLogger - -log = getLogger(__name__) from sat.core import exceptions from sat_frontends.quick_frontend.quick_widgets import QuickWidget from sat_frontends.quick_frontend.constants import Const as C from sat_frontends.tools import jid from collections import OrderedDict +log = getLogger(__name__) try: # FIXME: to be removed when an acceptable solution is here @@ -234,6 +233,14 @@ class ProfileContactList(object): @param contacts(tuple): all contacts """ for contact in contacts: + entity = jid.JID(contact[0]) + if entity.resource: + # we use entity's bare jid to cache data, so a resource here + # will cause troubles + log.warning( + "Roster entities with resources are not managed, ignoring {entity}" + .format(entity=entity)) + continue self.host.newContactHandler(*contact, profile=self.profile) handler._contactsFilled(self.profile)