From ee693621a20290d96f9768249c9b6c433f68032a Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Thu, 28 May 2020 19:11:25 -0300 Subject: [PATCH] Not try to close and remove matrix file if aux matrix is not a memmap --- invesalius/data/slice_.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index 86d7d5b..fdaf6ef 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -301,7 +301,10 @@ class Slice(metaclass=utils.Singleton): for name in self.aux_matrices: m = self.aux_matrices[name] - f = m.filename + try: + f = m.filename + except AttributeError: + continue m._mmap.close() m = None os.remove(f) -- libgit2 0.21.2