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

fix a bug with List

parent 529987bf
...@@ -264,10 +264,14 @@ class Workflow(threading.Thread): ...@@ -264,10 +264,14 @@ class Workflow(threading.Thread):
if param.type.__name__ == "inputfile" or param.type.__name__ == "browsefile": if param.type.__name__ == "inputfile" or param.type.__name__ == "browsefile":
for path in path2test: for path in path2test:
default_vals.append(os.path.join(self.jflow_config_reader.get_tmp_directory(), (path))) default_vals.append(os.path.join(self.jflow_config_reader.get_tmp_directory(), (path)))
self.__getattribute__(param.name).extend(default_vals) self.__setattr__(param.name, default_vals)
else:
self.__setattr__(param.name, [])
elif param.__class__ == ParameterList: elif param.__class__ == ParameterList:
if args[param.name]: if args[param.name]:
self.__getattribute__(param.name).extend(args[param.name]) self.__setattr__(param.name, args[param.name])
else:
self.__setattr__(param.name, [])
elif param.__class__ == MultiParameter: elif param.__class__ == MultiParameter:
sub_args = {} sub_args = {}
for sarg in args[param.name]: for sarg in args[param.name]:
...@@ -278,6 +282,7 @@ class Workflow(threading.Thread): ...@@ -278,6 +282,7 @@ class Workflow(threading.Thread):
else: else:
self.__getattribute__(param.name)[sub_param.name] = sub_param.default self.__getattribute__(param.name)[sub_param.name] = sub_param.default
elif param.__class__ == MultiParameterList: elif param.__class__ == MultiParameterList:
final_vals = []
for sargs in args[param.name]: for sargs in args[param.name]:
sub_args, final_sub_args = {}, {} sub_args, final_sub_args = {}, {}
for sarg in sargs: for sarg in sargs:
...@@ -287,7 +292,8 @@ class Workflow(threading.Thread): ...@@ -287,7 +292,8 @@ class Workflow(threading.Thread):
final_sub_args[sub_param.name] = sub_args[sub_param.flag] final_sub_args[sub_param.name] = sub_args[sub_param.flag]
else: else:
final_sub_args[sub_param.name] = sub_param.default final_sub_args[sub_param.name] = sub_param.default
self.__getattribute__(param.name).append(final_sub_args) final_vals.append(final_sub_args)
self.__setattr__(param.name, final_vals)
def get_execution_graph(self): def get_execution_graph(self):
graph = Graph() graph = Graph()
......
Supports Markdown
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