From f935a5e7eb8e96adceaea78c29874e83f6c9ec15 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Oct 2011 20:10:23 -0700 Subject: [PATCH] Use any() instead of list(filter()). --- pym/_emerge/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 162f70ffd..52e4c4286 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -1733,7 +1733,7 @@ def emerge_main(args=None): news_counts = count_unread_news( root_config.trees["porttree"].dbapi, root_config.trees["vartree"].dbapi) - if list(filter(None, news_counts.values())): + if any(news_counts.values()): display_news_notifications(news_counts) elif "--quiet" not in myopts: print("", colorize("GOOD", "*"), "No news items were found.") -- 2.26.2