From 098ba4d00be2d7fce29cb7e327c0664f815e5f5c Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Fri, 8 Jan 2010 19:10:25 +0000 Subject: [PATCH] FIX: Error remove temp file --- invesalius/data/surface.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index 16500f4..37bf290 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -360,10 +360,13 @@ class SurfaceManager(): actor.GetProperty().SetColor(colour) actor.GetProperty().SetOpacity(1-surface.transparency) - #Remove all temp file - os.remove(filename_img) - os.remove(filename_polydata) - + try: + #Remove all temp file + os.remove(filename_img) + os.remove(filename_polydata) + except(WindowsError): + print "Error remove temp file" + # Append surface into Project.surface_dict proj = prj.Project() index = proj.AddSurface(surface) -- libgit2 0.21.2