From: Benjamin Peterson Date: Thu, 7 May 2009 11:45:38 +0000 (+0000) Subject: actually close files instead of leaving it to the gc #5955 X-Git-Tag: v2.7a1~1256 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02588111254fb02f703d762e5990544852bd9965;p=python actually close files instead of leaving it to the gc #5955 --- diff --git a/Lib/aifc.py b/Lib/aifc.py index f9db3f4835..197e755210 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.