Commit cab6049e038b224303ee7498cd27bb74846e0015

Authored by tfmoraes
1 parent 0713ec50

FIX: verifies if a raycasting preset is in the invesalius or in user directory. …

…Related to ticket #107
Showing 1 changed file with 2 additions and 3 deletions   Show diff stats
invesalius/control.py
@@ -408,10 +408,9 @@ class Controller(): @@ -408,10 +408,9 @@ class Controller():
408 path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, 408 path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY,
409 const.RAYCASTING_FILES[label]) 409 const.RAYCASTING_FILES[label])
410 else: 410 else:
411 - try:  
412 - path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, 411 + path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY,
413 label+".plist") 412 label+".plist")
414 - except IOError: 413 + if not os.path.isfile(path):
415 path = os.path.join(const.USER_RAYCASTING_PRESETS_DIRECTORY, 414 path = os.path.join(const.USER_RAYCASTING_PRESETS_DIRECTORY,
416 label+".plist") 415 label+".plist")
417 preset = plistlib.readPlist(path) 416 preset = plistlib.readPlist(path)