Minor fix for automatic removal of temporary files

This commit is contained in:
Miroslav Stampar 2014-11-09 14:52:50 +01:00
parent d400dc27f2
commit 62a73bf30b

View File

@ -35,6 +35,7 @@ class BigArray(list):
self.cache = None
self.length = 0
self.filenames = set()
self._os_remove = os.remove
def append(self, value):
self.chunks[-1].append(value)
@ -121,6 +122,6 @@ class BigArray(list):
def __del__(self):
for filename in self.filenames:
try:
os.remove(filename)
self._os_remove(filename)
except:
pass