Skip to content
Snippets Groups Projects
Commit cc5d6ffc authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: runfsl errors on non-FSL commands

parent a4b3363e
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# run.py - Functions for running shell commands # run.py - Functions for running shell commands
# #
# Author: Paul McCarthy <pauldmccarthy@gmail.com> # Author: Paul McCarthy <pauldmccarthy@gmail.com>
# Author: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
# #
"""This module provides some functions for running shell commands. """This module provides some functions for running shell commands.
...@@ -358,6 +359,12 @@ def runfsl(*args, **kwargs): ...@@ -358,6 +359,12 @@ def runfsl(*args, **kwargs):
args[0] = cmdpath args[0] = cmdpath
break break
# error if the command cannot
# be found in a FSL directory
else:
raise FileNotFoundError('FSL tool {} not found (checked {})'.format(
args[0], ', '.join(prefixes)))
return run(*args, **kwargs) return run(*args, **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment