badfiles: Fixed weird use of sum

This commit is contained in:
François-Xavier Thomas 2015-08-15 14:37:54 +02:00
parent ecf677ae41
commit 27075ea037

View file

@ -49,7 +49,7 @@ class BadFiles(BeetsPlugin):
errors, output = self.run_command(["mp3val", path]) errors, output = self.run_command(["mp3val", path])
if errors == 0: if errors == 0:
output = [line for line in output if line.startswith("WARNING:")] output = [line for line in output if line.startswith("WARNING:")]
errors = sum(1 for line in output if line.startswith("WARNING:")) errors = len(output)
return errors, output return errors, output
def check_flac(self, path): def check_flac(self, path):