diff --git a/frontends/src/primitivus/contact_list.py b/frontends/src/primitivus/contact_list.py index 4e65d894..875a79d9 100644 --- a/frontends/src/primitivus/contact_list.py +++ b/frontends/src/primitivus/contact_list.py @@ -232,7 +232,9 @@ class ContactList(urwid.WidgetWrap, QuickContactList): @param contact (str): JID userhost of the contact @return: True if that contact should be showed in the list""" - return self.getCache(JID(contact), 'show') != "unavailable" or self.show_disconnected or contact in self.alert_jid or contact == self.selected + show = self.getCache(JID(contact), 'show') + return (show is not None and show != "unavailable") or \ + self.show_disconnected or contact in self.alert_jid or contact == self.selected def nonEmptyGroup(self, contacts): """Tell if a contact group contains some contacts to show.