Commit cab6049e038b224303ee7498cd27bb74846e0015
1 parent
0713ec50
Exists in
master
and in
68 other branches
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 | 408 | path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, |
409 | 409 | const.RAYCASTING_FILES[label]) |
410 | 410 | else: |
411 | - try: | |
412 | - path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, | |
411 | + path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, | |
413 | 412 | label+".plist") |
414 | - except IOError: | |
413 | + if not os.path.isfile(path): | |
415 | 414 | path = os.path.join(const.USER_RAYCASTING_PRESETS_DIRECTORY, |
416 | 415 | label+".plist") |
417 | 416 | preset = plistlib.readPlist(path) | ... | ... |