Commit 3a7c680f authored by Jerome Mariette's avatar Jerome Mariette
Browse files

ok for multiparameter

parent ebee8531
......@@ -249,9 +249,14 @@ class Workflow(threading.Thread):
sub_args[sarg[0]] = sarg[1]
for sub_param in param.sub_parameters:
if sub_args.has_key(sub_param.flag):
self.__getattribute__(param.name)[sub_param.name] = sub_args[sub_param.flag]
value = sub_args[sub_param.flag]
else:
self.__getattribute__(param.name)[sub_param.name] = sub_param.default
value = sub_param.default
if sub_param.__class__ == InputFile:
value = sub_param.prepare_input_file(value)
elif sub_param.__class__ == InputFileList:
value = sub_param.prepare_input_files(value)
self.__getattribute__(param.name)[sub_param.name] = value
elif param.__class__ == MultiParameterList:
final_vals = []
for sargs in args[param.name]:
......@@ -260,9 +265,14 @@ class Workflow(threading.Thread):
sub_args[sarg[0]] = sarg[1]
for sub_param in param.sub_parameters:
if sub_args.has_key(sub_param.flag):
final_sub_args[sub_param.name] = sub_args[sub_param.flag]
value = sub_args[sub_param.flag]
else:
final_sub_args[sub_param.name] = sub_param.default
value = sub_param.default
if sub_param.__class__ == InputFile:
value = sub_param.prepare_input_file(value)
elif sub_param.__class__ == InputFileList:
value = sub_param.prepare_input_files(value)
final_sub_args[sub_param.name] = value
final_vals.append(final_sub_args)
self.__setattr__(param.name, final_vals)
......
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