summaryrefslogtreecommitdiffstats
path: root/Lib/wave.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-12-28 13:26:42 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-12-28 13:26:42 (GMT)
commitda9ec995f66bdb69dce7292abc4e1ca86e6a626a (patch)
tree0e32ecfe5b56b5dc0a4c1fc46eae094edf411905 /Lib/wave.py
parente398da9ad0533d4bdca43aca8a7ff96cd02b7cfa (diff)
downloadcpython-da9ec995f66bdb69dce7292abc4e1ca86e6a626a.zip
cpython-da9ec995f66bdb69dce7292abc4e1ca86e6a626a.tar.gz
cpython-da9ec995f66bdb69dce7292abc4e1ca86e6a626a.tar.bz2
Issue #10783: struct.pack() doesn't encode implicitly unicode to UTF-8
* Replace "bytes" by "bytes object" in struct error messages * Document the API change in What's new in Python 3.2 * Fix test_wave * Remove also ugly implicit conversions in test_struct
Diffstat (limited to 'Lib/wave.py')
-rw-r--r--Lib/wave.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/wave.py b/Lib/wave.py
index b5bb105..2877137 100644
--- a/Lib/wave.py
+++ b/Lib/wave.py
@@ -467,11 +467,11 @@ class Wave_write:
self._datalength = self._nframes * self._nchannels * self._sampwidth
self._form_length_pos = self._file.tell()
self._file.write(struct.pack('<l4s4slhhllhh4s',
- 36 + self._datalength, 'WAVE', 'fmt ', 16,
+ 36 + self._datalength, b'WAVE', b'fmt ', 16,
WAVE_FORMAT_PCM, self._nchannels, self._framerate,
self._nchannels * self._framerate * self._sampwidth,
self._nchannels * self._sampwidth,
- self._sampwidth * 8, 'data'))
+ self._sampwidth * 8, b'data'))
self._data_length_pos = self._file.tell()
self._file.write(struct.pack('<l', self._datalength))
self._headerwritten = True