Mercurial > touhou
diff pytouhou/formats/fmt.py @ 385:d8aab27a2ab2
Add missing imports, and remove side-effects in asserts.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 20 Oct 2012 20:44:11 +0200 |
parents | cddfd3cb4797 |
children | d1f0bb0b7a17 |
line wrap: on
line diff
--- a/pytouhou/formats/fmt.py +++ b/pytouhou/formats/fmt.py @@ -61,7 +61,8 @@ class FMT(list): assert track.wFormatTag == 1 # We don’t support non-PCM formats assert track.dwAvgBytesPerSec == track.dwSamplesPerSec * track.wBlockAlign assert track.wBlockAlign == track.wChannels * track.wBitsPerSample // 8 - assert b'\00\00\00\00' == file.read(4) + zero = file.read(4) + assert b'\00\00\00\00' == zero self.append(track)