diff options
author | Zackery Spytz <zspytz@gmail.com> | 2018-02-20 21:06:11 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-02-20 21:06:11 (GMT) |
commit | 80d20b918bd8a882043c493a7f958333ecb41727 (patch) | |
tree | 3ad6f72c03dd3218a75fa0fc50898f57275fb4a8 /Lib/aifc.py | |
parent | 7a1e1786f98ad49caa157dcdf14ada9d0b07d0fd (diff) | |
download | cpython-80d20b918bd8a882043c493a7f958333ecb41727.zip cpython-80d20b918bd8a882043c493a7f958333ecb41727.tar.gz cpython-80d20b918bd8a882043c493a7f958333ecb41727.tar.bz2 |
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.
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r-- | Lib/aifc.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py index e51e8f8..3d2dc56 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -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: |