Skip to content

Commit

Permalink
Handle change to interal API of argparse.ArgumentParser.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidraker committed Apr 20, 2024
1 parent 8286369 commit b457378
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion volttron/platform/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,12 @@ def _take(n):
cli_args.append(arg_string)
continue
# Some kind of option was encountered, so deal with it
action, option_string, explicit_arg = option_tuple
if len(option_tuple) == 3:
action, option_string, explicit_arg = option_tuple
elif len(option_tuple) == 4:
action, option_string, _, explicit_arg = option_tuple
else:
raise ValueError(f'Unable to parse options: "{arg_strings}".')
if explicit_arg is not None:
args = [explicit_arg]
elif action.nargs in [_argparse.REMAINDER, _argparse.PARSER]:
Expand Down

0 comments on commit b457378

Please sign in to comment.