diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-02-20 14:06:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 14:06:58 -0800 |
commit | 1d927d4feba856cacc026a9167ba38c73a4e7657 (patch) | |
tree | 982f58f7aed1477ecff827a89660734787e2838f /Lib/aifc.py | |
parent | bab4fe320ad2e24c1084fd57d2059ef342688aa9 (diff) | |
download | cpython-git-1d927d4feba856cacc026a9167ba38c73a4e7657.tar.gz |
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240)
Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918bd8a882043c493a7f958333ecb41727)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
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 e51e8f8e48..3d2dc56de1 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: |