diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-21 11:02:30 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-21 11:02:30 +0200 |
commit | f0a230d62325e33297adf44770b7d94180250d23 (patch) | |
tree | dc6d069e4d0ea283efde69a2a9e231f618f40d9e /Lib/wave.py | |
parent | 44b372000c3abf4474fe62dd0028f8d26207cedf (diff) | |
download | cpython-f0a230d62325e33297adf44770b7d94180250d23.tar.gz |
Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
big-endian platforms.
Temporary forbidden test_unseekable_incompleted_write fornot compressed 16-
and 32-bit wave file on big-endian platforms.
Diffstat (limited to 'Lib/wave.py')
-rw-r--r-- | Lib/wave.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/wave.py b/Lib/wave.py index 6285c74876..4a223451bf 100644 --- a/Lib/wave.py +++ b/Lib/wave.py @@ -424,7 +424,9 @@ class Wave_write: data = self._convert(data) if self._sampwidth in (2, 4) and sys.byteorder == 'big': import array - data = array.array(_array_fmts[self._sampwidth], data) + a = array.array(_array_fmts[self._sampwidth]) + a.frombytes(data) + data = a assert data.itemsize == self._sampwidth data.byteswap() data.tofile(self._file) |