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

This commit is contained in:
Benjamin Peterson 2009-05-07 11:45:38 +00:00
parent dd26681155
commit 0258811125
1 changed files with 2 additions and 3 deletions

View File

@ -347,7 +347,7 @@ class Aifc_read:
if self._decomp: if self._decomp:
self._decomp.CloseDecompressor() self._decomp.CloseDecompressor()
self._decomp = None self._decomp = None
self._file = None self._file.close()
def tell(self): def tell(self):
return self._soundpos return self._soundpos
@ -734,8 +734,7 @@ class Aifc_write:
self._comp = None self._comp = None
# Prevent ref cycles # Prevent ref cycles
self._convert = None self._convert = None
self._file.flush() self._file.close()
self._file = None
# #
# Internal methods. # Internal methods.