mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
This commit is contained in:
parent
d83b7c2df4
commit
74a49ac3f5
5 changed files with 12 additions and 14 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue