From: Zac Medico Date: Sat, 29 Oct 2011 03:10:23 +0000 (-0700) Subject: Use any() instead of list(filter()). X-Git-Tag: v2.2.0_alpha72~30 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f935a5e7eb8e96adceaea78c29874e83f6c9ec15;p=portage.git Use any() instead of list(filter()). --- 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.")