diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-05-07 16:27:02 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-05-07 16:27:02 (GMT) |
commit | 8fd522fb5f45aa05252c32063dc9c624f2e788b3 (patch) | |
tree | d59e2fe8b9ca033acae8fd5a7835a1681407e0d0 /Lib/aifc.py | |
parent | 02588111254fb02f703d762e5990544852bd9965 (diff) | |
download | cpython-8fd522fb5f45aa05252c32063dc9c624f2e788b3.zip cpython-8fd522fb5f45aa05252c32063dc9c624f2e788b3.tar.gz cpython-8fd522fb5f45aa05252c32063dc9c624f2e788b3.tar.bz2 |
Issue5955: aifc's close method did not close the file it wrapped,
now it does. This also means getfp method now returns the real fp.
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r-- | Lib/aifc.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py index 197e755..b4123ca 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -282,10 +282,11 @@ class Aifc_read: self._convert = None self._markers = [] self._soundpos = 0 - self._file = Chunk(file) - if self._file.getname() != 'FORM': + self._file = file + chunk = Chunk(file) + if chunk.getname() != 'FORM': raise Error, 'file does not start with FORM id' - formdata = self._file.read(4) + formdata = chunk.read(4) if formdata == 'AIFF': self._aifc = 0 elif formdata == 'AIFC': |