summaryrefslogtreecommitdiffstats
path: root/Lib/aifc.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-05-07 11:45:38 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-05-07 11:45:38 (GMT)
commit02588111254fb02f703d762e5990544852bd9965 (patch)
treef9954ef4ff8ae25e5c317d5c238111777545b300 /Lib/aifc.py
parentdd266811554e19d0a03bc70befe674daeb7fcdda (diff)
downloadcpython-02588111254fb02f703d762e5990544852bd9965.zip
cpython-02588111254fb02f703d762e5990544852bd9965.tar.gz
cpython-02588111254fb02f703d762e5990544852bd9965.tar.bz2
actually close files instead of leaving it to the gc #5955
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r--Lib/aifc.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py
index f9db3f4..197e755 100644
--- a/Lib/aifc.py
+++ b/Lib/aifc.py
@@ -347,7 +347,7 @@ class Aifc_read:
if self._decomp:
self._decomp.CloseDecompressor()
self._decomp = None
- self._file = None
+ self._file.close()
def tell(self):
return self._soundpos
@@ -734,8 +734,7 @@ class Aifc_write:
self._comp = None
# Prevent ref cycles
self._convert = None
- self._file.flush()
- self._file = None
+ self._file.close()
#
# Internal methods.