diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-05-07 18:24:38 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-05-07 18:24:38 (GMT) |
commit | 993527485ebb3f8a7e8759ab480547a0b61b82eb (patch) | |
tree | 1ab68554a371d560d34d2eae3a7cffe2f946f409 /Lib/aifc.py | |
parent | 865e01ab3ef817360e24c7ff70ed5c223c2ad6b4 (diff) | |
download | cpython-993527485ebb3f8a7e8759ab480547a0b61b82eb.zip cpython-993527485ebb3f8a7e8759ab480547a0b61b82eb.tar.gz cpython-993527485ebb3f8a7e8759ab480547a0b61b82eb.tar.bz2 |
Merged revisions 72425-72426 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72425 | r.david.murray | 2009-05-07 12:27:02 -0400 (Thu, 07 May 2009) | 3 lines
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.
........
r72426 | r.david.murray | 2009-05-07 12:29:19 -0400 (Thu, 07 May 2009) | 3 lines
News item for Issue5955.
........
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 c03446f..015d398 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -281,10 +281,11 @@ class Aifc_read: self._convert = None self._markers = [] self._soundpos = 0 - self._file = Chunk(file) - if self._file.getname() != b'FORM': + self._file = file + chunk = Chunk(file) + if chunk.getname() != b'FORM': raise Error('file does not start with FORM id') - formdata = self._file.read(4) + formdata = chunk.read(4) if formdata == b'AIFF': self._aifc = 0 elif formdata == b'AIFC': |