MCPcopy Index your code
hub / github.com/aws/aws-cli / validate_boolean_mutex_groups

Function validate_boolean_mutex_groups

awscli/customizations/toplevelbool.py:99–109  ·  view source on GitHub ↗
(boolean_pairs, parsed_args, **kwargs)

Source from the content-addressed store, hash-verified

97
98
99def validate_boolean_mutex_groups(boolean_pairs, parsed_args, **kwargs):
100 # Validate we didn't pass in an --option and a --no-option.
101 for positive, negative in boolean_pairs:
102 if (
103 getattr(parsed_args, positive.py_name) is not _NOT_SPECIFIED
104 and getattr(parsed_args, negative.py_name) is not _NOT_SPECIFIED
105 ):
106 raise ParamValidationError(
107 'Cannot specify both the "%s" option and '
108 'the "%s" option.' % (positive.cli_name, negative.cli_name)
109 )
110
111
112class PositiveBooleanArgument(arguments.CLIArgument):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected