Use any() instead of list(filter()).
authorZac Medico <zmedico@gentoo.org>
Sat, 29 Oct 2011 03:10:23 +0000 (20:10 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 29 Oct 2011 03:10:23 +0000 (20:10 -0700)
pym/_emerge/main.py

index 162f70ffdb44f1d1f4e776be973d603a34430ebe..52e4c4286baf1765e88e8cbb310a7ddddeb76418 100644 (file)
@@ -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.")