From cee802b6efa027702d1e9fbaa6f440b22cc2996b Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 13 Oct 2017 23:15:03 +0200 Subject: Fix the last pylint error (do not set the roster contact filter to None) --- poezio/windows/roster_win.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'poezio/windows') diff --git a/poezio/windows/roster_win.py b/poezio/windows/roster_win.py index eda1cf10..73191e84 100644 --- a/poezio/windows/roster_win.py +++ b/poezio/windows/roster_win.py @@ -93,25 +93,25 @@ class RosterWin(Win): return log.debug('The roster has changed, rebuilding the cacheā€¦') # This is a search - if roster.contact_filter: + if roster.contact_filter is not roster.DEFAULT_FILTER: self.roster_cache = [] sort = config.get('roster_sort', 'jid:show') or 'jid:show' for contact in roster.get_contacts_sorted_filtered(sort): self.roster_cache.append(contact) else: - show_offline = config.get('roster_show_offline') or roster.contact_filter + show_offline = config.get('roster_show_offline') sort = config.get('roster_sort') or 'jid:show' group_sort = config.get('roster_group_sort') or 'name' self.roster_cache = [] # build the cache for group in roster.get_groups(group_sort): - contacts_filtered = group.get_contacts(roster.contact_filter) + contacts_filtered = group.get_contacts() if (not show_offline and group.get_nb_connected_contacts() == 0) or not contacts_filtered: continue # Ignore empty groups self.roster_cache.append(group) if group.folded: continue # ignore folded groups - for contact in group.get_contacts(roster.contact_filter, sort): + for contact in group.get_contacts(sort=sort): if not show_offline and len(contact) == 0: continue # ignore offline contacts self.roster_cache.append(contact) -- cgit v1.2.3