Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad7324c

Browse files
Don't close the file explicitly.
1 parent feaa7d2 commit ad7324c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/sunau.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ def setpos(self, pos):
274274
self._soundpos = pos
275275

276276
def close(self):
277-
self._file.close()
278277
self._file = None
279278

280279
class Au_write:
@@ -397,7 +396,7 @@ def close(self):
397396
if self._nframeswritten != self._nframes or \
398397
self._datalength != self._datawritten:
399398
self._patchheader()
400-
self._file.close()
399+
self._file.flush()
401400
self._file = None
402401

403402
#

0 commit comments

Comments
 (0)