diff options
author | 2013-11-16 14:01:31 +0200 | |
---|---|---|
committer | 2013-11-16 14:01:31 +0200 | |
commit | 452bab4acf57c8dd156b794fe0d1672e1ab29b43 (patch) | |
tree | d167584d1dd05c4ca5303c4ff91c2dfa927a5e06 /Lib/sunau.py | |
parent | Issue #5202: Added support for unseekable files in the wave module. (diff) | |
download | cpython-452bab4acf57c8dd156b794fe0d1672e1ab29b43.tar.gz cpython-452bab4acf57c8dd156b794fe0d1672e1ab29b43.tar.bz2 cpython-452bab4acf57c8dd156b794fe0d1672e1ab29b43.zip |
Issue #16685: Added support for writing any bytes-like objects in the aifc,
sunau, and wave modules.
Diffstat (limited to 'Lib/sunau.py')
-rw-r--r-- | Lib/sunau.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/sunau.py b/Lib/sunau.py index 1880a01d1a2..3c244925d1e 100644 --- a/Lib/sunau.py +++ b/Lib/sunau.py @@ -415,6 +415,8 @@ class Au_write: return self._nframeswritten def writeframesraw(self, data): + if not isinstance(data, (bytes, bytearray)): + data = memoryview(data).cast('B') self._ensure_header_written() if self._comptype == 'ULAW': import audioop |