* morituri/program/cdrdao.py:

Avoid floating point error.
This commit is contained in:
Thomas Vander Stichele
2011-07-20 02:37:00 +00:00
parent 5f8e0a5cc4
commit b3bbf55ca2
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2011-07-20 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/program/cdrdao.py:
Avoid floating point error.
2011-07-09 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/common/task.py:

View File

@@ -431,7 +431,8 @@ class ReadSessionTask(CDRDAOTask):
def readbyteserr(self, bytes):
self.parser.read(bytes)
self.setProgress(float(self.parser.track - 1) / self.parser.tracks)
if self.parser.tracks > 0:
self.setProgress(float(self.parser.track - 1) / self.parser.tracks)
def done(self):
# by merging the TOC info.