File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -185,9 +185,16 @@ def update_mutex_groups(arg_action: argparse.Action) -> bool:
185185
186186 # Check if the group this action belongs to has already been completed
187187 if group in completed_mutex_groups :
188+
189+ # If this is the action that completed the group, then there is no error
190+ # since it's allowed to appear on the command line more than once.
191+ completer_action = completed_mutex_groups [group ]
192+ if arg_action == completer_action :
193+ return True
194+
188195 error = style_error ("\n Error: argument {}: not allowed with argument {}\n " .
189196 format (argparse ._get_action_name (arg_action ),
190- argparse ._get_action_name (completed_mutex_groups [ group ] )))
197+ argparse ._get_action_name (completer_action )))
191198 self ._print_message (error )
192199 return False
193200
You can’t perform that action at this time.
0 commit comments