Skip to content

Commit 92cebe7

Browse files
alexbarreramr-c
authored andcommitted
Avoid type argument when adding boolean arguments
1 parent 9b0ba78 commit 92cebe7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cwltool/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,10 @@ def generate_parser(toolparser, tool, namemap):
285285
_logger.debug(u"Can't make command line argument from %s", inptype)
286286
return None
287287

288-
toolparser.add_argument(flag + name, required=required,
289-
help=ahelp, action=action, type=atype, default=default)
288+
argument_kwargs = {'required': required, 'help': ahelp, 'action': action, 'default': default}
289+
if inptype != "boolean":
290+
argument_kwargs['type'] = atype
291+
toolparser.add_argument(flag + name, **argument_kwargs)
290292

291293
return toolparser
292294

0 commit comments

Comments
 (0)