diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-20 16:46:19 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-20 16:46:19 +0200 |
commit | c7e61c70f8466b6a8f6b35a6c1254f220cd0c2f1 (patch) | |
tree | 633e6f6ed23f1d0aefa6caf7833d3ec4a33c4ac0 /Lib/sunau.py | |
parent | fd8274f3b8bf96338140187475bbb1b550c5f484 (diff) | |
download | cpython-c7e61c70f8466b6a8f6b35a6c1254f220cd0c2f1.tar.gz |
Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
Diffstat (limited to 'Lib/sunau.py')
-rw-r--r-- | Lib/sunau.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/sunau.py b/Lib/sunau.py index 3c244925d1..3da41b75e4 100644 --- a/Lib/sunau.py +++ b/Lib/sunau.py @@ -210,12 +210,9 @@ class Au_read: self._framesize = self._framesize * self._nchannels if self._hdr_size > 24: self._info = file.read(self._hdr_size - 24) - for i in range(len(self._info)): - if self._info[i] == b'\0': - self._info = self._info[:i] - break + self._info, _, _ = self._info.partition(b'\0') else: - self._info = '' + self._info = b'' try: self._data_pos = file.tell() except (AttributeError, OSError): |