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

No commit message

No commit message
parent b74637de
......@@ -454,8 +454,7 @@ class InputFileList(ParameterList, AbstractIOFile):
def __init__(self, name, help, file_format="any", default=None, type="localfile", choices=None,
required=False, flag=None, group="default", display_name=None):
if default == None: default = []
if default == None: default = []
if hasattr(type, '__call__'):
type2test = type.__name__
else: type2test = type
......@@ -467,13 +466,19 @@ class InputFileList(ParameterList, AbstractIOFile):
AbstractIOFile.__init__(self, file_format)
ParameterList.__init__(self, name, help, flag=flag, default=default, type=type, choices=choices,
required=required, group=group, display_name=display_name)
if default.__class__.__name__ == "str":
return list.__init__(self, [default])
elif default.__class__.__name__ == "InputFile":
return list.__init__(self, default)
elif default.__class__.__name__ == "OutputFile":
return list.__init__(self, default)
elif default.__class__.__name__ == "list":
return list.__init__(self, default)
elif default.__class__.__name__ == "InputFileList":
return list.__init__(self, default)
elif default.__class__.__name__ == "OutputFileList":
return list.__init__(self, default)
class OutputFileList(ParameterList, AbstractIOFile):
......
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