Commit 59981232 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

better handle of makeflow path checking

parent d3a2fe14
......@@ -70,7 +70,7 @@ class JFlowConfigReader(object):
exec_path = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), "bin", software)
if exec_path is None: exec_path = software
if self.__which(exec_path) == None:
sys.stderr.write("Error: '" + software + "' connot be retrieved either in the PATH and in the application.properties file!\n")
sys.stderr.write("Error: '" + software + "' path connot be retrieved either in the PATH and in the application.properties file!\n")
sys.exit(1)
return exec_path
......@@ -89,10 +89,15 @@ class JFlowConfigReader(object):
def get_makeflow_path(self):
try:
return self.reader.get("global", "makeflow")
exec_path = self.reader.get("global", "makeflow")
except NoOptionError, e:
return None
exec_path = None
if exec_path is None: exec_path = software
if self.__which(exec_path) == None:
sys.stderr.write("Error: 'makeflow' path connot be retrieved either in the PATH and in the application.properties file!\n")
sys.exit(1)
return exec_path
def get_batch(self):
try:
type = self.reader.get("global", "batch_system_type")
......
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