Skip to content

Commit

Permalink
Support for repeated arguments such as --setParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
abdul committed Dec 6, 2017
1 parent 2f40a81 commit 790381a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mongoctl/commands/command_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ def options_to_command_args(args):
continue
elif arg_val is True:
command_args.append("--%s" % arg_name)
elif isinstance(arg_val, list):
# expand multiple options per argument values
for arg_val_item in arg_val:
command_args.append("--%s" % arg_name)
command_args.append(str(arg_val_item))
else:
command_args.append("--%s" % arg_name)
command_args.append(str(arg_val))
Expand Down

0 comments on commit 790381a

Please sign in to comment.