Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
diff --git a/Lib/sunau.py b/Lib/sunau.py
index 3c24492..3da41b7 100644
--- a/Lib/sunau.py
+++ b/Lib/sunau.py
@@ -210,12 +210,9 @@
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):