From 670930efc5243f78c11770d39d476ad857cd85c8 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Wed, 4 Aug 2021 10:34:02 -0300 Subject: [PATCH] wrapping del self.matrix with a try because mask.matrix is already remove on Linux --- invesalius/data/mask.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/invesalius/data/mask.py b/invesalius/data/mask.py index 9b3598a..070640b 100644 --- a/invesalius/data/mask.py +++ b/invesalius/data/mask.py @@ -480,5 +480,9 @@ class Mask(): self.save_history(index, orientation, matrix.copy(), cp_mask) def __del__(self): - del self.matrix + # On Linux self.matrix is already removed so it gives an error + try: + del self.matrix + except AttributeError: + pass os.remove(self.temp_file) -- libgit2 0.21.2