Commit 2f789d18 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

get_exec_path handle sub execution files

parent 7800cfad
......@@ -138,10 +138,10 @@ class Component(object):
exec_path = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), "../bin", software)
elif exec_path is None and os.path.isfile(os.path.join(os.path.dirname(inspect.getfile(self.__class__)), "bin", software)):
exec_path = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), "bin", software)
if exec_path is None: exec_path = software
if which(exec_path) == None:
if exec_path is None and which(software) == None:
sys.stderr.write("Error: '" + software + "' path connot be retrieved either in the PATH and in the application.properties file!\n")
sys.exit(1)
else: exec_path = software
return exec_path
def get_nameid(self):
......
......@@ -184,10 +184,10 @@ class Workflow(threading.Thread):
exec_path = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), "../bin", software)
elif exec_path is None and os.path.isfile(os.path.join(os.path.dirname(inspect.getfile(self.__class__)), "bin", software)):
exec_path = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), "bin", software)
if exec_path is None: exec_path = software
if utils.which(exec_path) == None:
if exec_path is None and utils.which(software) == None:
sys.stderr.write("Error: '" + software + "' path connot be retrieved either in the PATH and in the application.properties file!\n")
sys.exit(1)
else: exec_path = software
return exec_path
def add_component(self, component_name, args=[], kwargs={}, component_prefix="default"):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment