We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 543f812 + d27282b commit b61635bCopy full SHA for b61635b
novaclient/shell.py
@@ -232,8 +232,11 @@ def _get_option_tuples(self, option_string):
232
option_tuples = (super(NovaClientArgumentParser, self)
233
._get_option_tuples(option_string))
234
if len(option_tuples) > 1:
235
- normalizeds = [option.replace('_', '-')
236
- for action, option, value in option_tuples]
+ # In Python < 3.12, this is a 3-part tuple:
+ # action, option_string, explicit_arg
237
+ # In Python >= 3.12, this is a 4 part tuple:
238
+ # action, option_string, sep, explicit_arg
239
+ normalizeds = [opt[1].replace('_', '-') for opt in option_tuples]
240
if len(set(normalizeds)) == 1:
241
return option_tuples[:1]
242
return option_tuples
0 commit comments