downloads: change len() to sum()

This commit is contained in:
Daniel Schadt 2016-05-08 23:24:50 +02:00
parent 643d2cc6dd
commit 99182e3e79

View File

@ -1245,4 +1245,4 @@ class DownloadManager(QAbstractListModel):
Return:
The number of unfinished downloads.
"""
return len([1 for download in self.downloads if not download.done])
return sum(1 for download in self.downloads if not download.done)