From 62a73bf30b7cb103d055e34e33e5e93a3e9c1bcd Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 9 Nov 2014 14:52:50 +0100 Subject: [PATCH] Minor fix for automatic removal of temporary files --- lib/core/bigarray.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core/bigarray.py b/lib/core/bigarray.py index 04ef7a691..36dfd7e42 100644 --- a/lib/core/bigarray.py +++ b/lib/core/bigarray.py @@ -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