]> granicus.if.org Git - python/commitdiff
Amazing. This would open the sound file in text mode. Fixed.
authorGuido van Rossum <guido@python.org>
Tue, 31 Jul 2001 06:27:07 +0000 (06:27 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 31 Jul 2001 06:27:07 +0000 (06:27 +0000)
SF bug  #446219.

Lib/sndhdr.py

index 29f0760c9e412775e2bb44fe6369f6b12cfaf043..df2ccf17ba4b99510329549bf147ac68f65e4fd4 100644 (file)
@@ -40,7 +40,7 @@ def what(filename):
 
 def whathdr(filename):
     """Recognize sound headers"""
-    f = open(filename, 'r')
+    f = open(filename, 'rb')
     h = f.read(512)
     for tf in tests:
         res = tf(h, f)