diff --git a/whipper/program/cdparanoia.py b/whipper/program/cdparanoia.py index 07f2e699..936c3e59 100644 --- a/whipper/program/cdparanoia.py +++ b/whipper/program/cdparanoia.py @@ -192,16 +192,17 @@ def getTrackQuality(self): reads = self.reads logger.debug('getTrackQuality: frames %d, reads %d' % (frames, reads)) - # don't go over a 100%; we know cdparanoia reads each frame at least - # twice try: + # don't go over a 100% + # we know that cdparanoia reads each frame at least twice return min(frames * 2.0 / reads, 1.0) except ZeroDivisionError: - return 0 - + raise RuntimeError("cdparanoia couldn't read any frames " + "for the current track") # FIXME: handle errors + class ReadTrackTask(task.Task): """ I am a task that reads a track using cdparanoia.