[Python-3000] Fix sndhdr module for bytes

Victor Stinner victor.stinner at haypocalc.com
Sat Aug 11 03:09:00 CEST 2007


Hi,

As imghdr, sndhdr tests were strill based on Unicode strings instead of bytes.

Attached patch should fix the module. I'm very, I was unable to test it.

Note: I replaced aifc.openfp with aifc.open since it's the new public 
function.

sndhdr requires some cleanup: it doesn't check division by zero in functions 
test_hcom and test_voc. I think that division by zero means that the file is 
invalid. I didn't want to fix these bugs in the same patch. So first I'm 
waiting your comments about this one :-)

Victor Stinner
http://hachoir.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: py3k-sndhdr.patch
Type: text/x-diff
Size: 3258 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-3000/attachments/20070811/25d513cc/attachment-0001.bin 


More information about the Python-3000 mailing list