mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (#5240)
Initialize self._ssnd_chunk so that aifc.Error is raised as intended, not AttributeError.
This commit is contained in:
parent
7a1e1786f9
commit
80d20b918b
4 changed files with 12 additions and 0 deletions
|
@ -322,6 +322,7 @@ class Aifc_read:
|
|||
else:
|
||||
raise Error('not an AIFF or AIFF-C file')
|
||||
self._comm_chunk_read = 0
|
||||
self._ssnd_chunk = None
|
||||
while 1:
|
||||
self._ssnd_seek_needed = 1
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue