]> granicus.if.org Git - python/commitdiff
Merged revisions 72422 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Thu, 7 May 2009 11:53:38 +0000 (11:53 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 7 May 2009 11:53:38 +0000 (11:53 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72422 | benjamin.peterson | 2009-05-07 06:45:38 -0500 (Thu, 07 May 2009) | 1 line

  actually close files instead of leaving it to the gc #5955
........

Lib/aifc.py

index 702a451b128c4f50ade36212b5c0c42df710ccdb..c03446fee088227f5522bc990be9ac97c5a54858 100644 (file)
@@ -331,7 +331,7 @@ class Aifc_read:
         self._soundpos = 0
 
     def close(self):
-        self._file = None
+        self._file.close()
 
     def tell(self):
         return self._soundpos
@@ -692,8 +692,7 @@ class Aifc_write:
             self._patchheader()
         # Prevent ref cycles
         self._convert = None
-        self._file.flush()
-        self._file = None
+        self._file.close()
 
     #
     # Internal methods.