Sitelet https://github.com/modulexcite/aws-cli/commit/127e8eeae4776d29134ef06b75c81db31e71e5f7
Skip to content

Commit 127e8ee

Browse files
committed
Remove choices special casing, not needed
The cli.json no longer uses references like this anymore.
1 parent 7fcc195 commit 127e8ee

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

‎awscli/clidriver.py‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,6 @@ def _build_argument_table(self):
125125
cli_arguments = cli_data.get('options', None)
126126
for option in cli_arguments:
127127
option_params = copy_kwargs(cli_arguments[option])
128-
# Special case the 'choices' param. Allows choices
129-
# to reference a variable from the session.
130-
if 'choices' in option_params:
131-
choices = option_params['choices']
132-
if not isinstance(choices, list):
133-
# Assume it's a reference like
134-
# "{provider}/_foo", so first resolve
135-
# the provider.
136-
provider = self.session.get_config_variable('provider')
137-
# The grab the var from the session
138-
choices_path = choices.format(provider=provider)
139-
choices = list(self.session.get_data(choices_path))
140-
option_params['choices'] = choices
141128
cli_argument = self._create_cli_argument(option, option_params)
142129
cli_argument.add_to_arg_table(argument_table)
143130
# Then the final step is to send out an event so handlers

‎tests/unit/test_clidriver.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@
8282
},
8383
}
8484
},
85-
'aws/_services': {'s3':{}},
86-
'aws/_regions': {},
8785
}
8886

8987
GET_VARIABLE = {

0 commit comments

Comments
 (0)