Commit 020a6d58 authored by Frédéric Escudié's avatar Frédéric Escudié
Browse files

Fix bugs with parameters from GUI.

parent 78b4ec79
...@@ -67,8 +67,6 @@ def urlfile(file): ...@@ -67,8 +67,6 @@ def urlfile(file):
raise argparse.ArgumentTypeError("URL '" + file + "' does not contain any file name!") raise argparse.ArgumentTypeError("URL '" + file + "' does not contain any file name!")
def inputfile(file): def inputfile(file):
if file == None:
return None
# test the format # test the format
uri_object = urlparse(file) uri_object = urlparse(file)
# check the file # check the file
......
...@@ -240,14 +240,17 @@ class Workflow(threading.Thread): ...@@ -240,14 +240,17 @@ class Workflow(threading.Thread):
required=parameter.required, flag=parameter.flag, group=parameter.group, required=parameter.required, flag=parameter.flag, group=parameter.group,
display_name=parameter.display_name ) display_name=parameter.display_name )
elif parameter.__class__ == ParameterList: elif parameter.__class__ == ParameterList:
if value == "" : value = [] # from GUI
new_param = ParameterList( parameter.name, parameter.help, default=value, type=parameter.type, choices=parameter.choices, new_param = ParameterList( parameter.name, parameter.help, default=value, type=parameter.type, choices=parameter.choices,
required=parameter.required, flag=parameter.flag, sub_parameters=parameter.sub_parameters, required=parameter.required, flag=parameter.flag, sub_parameters=parameter.sub_parameters,
group=parameter.group, display_name=parameter.display_name ) group=parameter.group, display_name=parameter.display_name )
elif parameter.__class__ == InputFileList: elif parameter.__class__ == InputFileList:
if value == "" : value = [] # from GUI
new_param = InputFileList( parameter.name, parameter.help, file_format=parameter.file_format, default=parameter.prepare_input_files(value), new_param = InputFileList( parameter.name, parameter.help, file_format=parameter.file_format, default=parameter.prepare_input_files(value),
type=parameter.type, choices=parameter.choices, required=parameter.required, flag=parameter.flag, type=parameter.type, choices=parameter.choices, required=parameter.required, flag=parameter.flag,
group=parameter.group, display_name=parameter.display_name, size_limit=parameter.size_limit ) group=parameter.group, display_name=parameter.display_name, size_limit=parameter.size_limit )
elif parameter.__class__ == InputFile: elif parameter.__class__ == InputFile:
if value == "" : value = None # from GUI
new_param = InputFile( parameter.name, parameter.help, file_format=parameter.file_format, default=parameter.prepare_input_file(value), new_param = InputFile( parameter.name, parameter.help, file_format=parameter.file_format, default=parameter.prepare_input_file(value),
type=parameter.type, choices=parameter.choices, required=parameter.required, flag=parameter.flag, type=parameter.type, choices=parameter.choices, required=parameter.required, flag=parameter.flag,
group=parameter.group, display_name=parameter.display_name ) group=parameter.group, display_name=parameter.display_name )
......
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