* morituri/common/checksum.py:

* morituri/common/common.py:
	* morituri/image/image.py:
	* morituri/image/table.py:
	* morituri/program/cdparanoia.py:
	  Move constants to common
This commit is contained in:
Thomas Vander Stichele
2009-05-16 09:21:55 +00:00
parent 204c5d6212
commit 59cb5d0dcb
6 changed files with 36 additions and 29 deletions

View File

@@ -194,14 +194,14 @@ class ReadTrackTask(task.Task):
size = os.stat(self.path)[stat.ST_SIZE]
# wav header is 44 bytes
offsetLength = self._stop - self._start + 1
expected = offsetLength * checksum.BYTES_PER_FRAME + 44
expected = offsetLength * common.BYTES_PER_FRAME + 44
if size != expected:
# FIXME: handle errors better
self.warning('file size %d did not match expected size %d',
size, expected)
if (size - expected) % checksum.BYTES_PER_FRAME == 0:
if (size - expected) % common.BYTES_PER_FRAME == 0:
print 'ERROR: %d frames difference' % (
(size - expected) / checksum.BYTES_PER_FRAME)
(size - expected) / common.BYTES_PER_FRAME)
self.exception = FileSizeError(self.path)