Commit 098ba4d00be2d7fce29cb7e327c0664f815e5f5c

Authored by Paulo Henrique Junqueira Amorim
1 parent 6a82b017

FIX: Error remove temp file

Showing 1 changed file with 7 additions and 4 deletions   Show diff stats
invesalius/data/surface.py
... ... @@ -360,10 +360,13 @@ class SurfaceManager():
360 360 actor.GetProperty().SetColor(colour)
361 361 actor.GetProperty().SetOpacity(1-surface.transparency)
362 362  
363   - #Remove all temp file
364   - os.remove(filename_img)
365   - os.remove(filename_polydata)
366   -
  363 + try:
  364 + #Remove all temp file
  365 + os.remove(filename_img)
  366 + os.remove(filename_polydata)
  367 + except(WindowsError):
  368 + print "Error remove temp file"
  369 +
367 370 # Append surface into Project.surface_dict
368 371 proj = prj.Project()
369 372 index = proj.AddSurface(surface)
... ...