summaryrefslogtreecommitdiff
path: root/Lib/wave.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-12-28 13:26:42 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-12-28 13:26:42 +0000
commit270efe614192a94b24ecd59ad6c95f9498df48ae (patch)
tree87a62acbd81316634459b2eeb3eca9e259cac5e6 /Lib/wave.py
parent9eef850f4d72237be77daae66b7e73e1fe507e14 (diff)
downloadcpython-270efe614192a94b24ecd59ad6c95f9498df48ae.tar.gz
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 b5bb105d61..2877137add 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