mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
installer: index() raises ValueError
Expecting IndexError instead of ValueError led to traceback instead of correctly reporting the error situation. https://fedorahosted.org/freeipa/ticket/5945 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
54318d1a2c
commit
9f48c39649
@ -299,9 +299,9 @@ class ConfigureTool(admintool.AdminTool):
|
|||||||
knob_cls = knob_classes[e.name]
|
knob_cls = knob_classes[e.name]
|
||||||
try:
|
try:
|
||||||
if self.positional_arguments is None:
|
if self.positional_arguments is None:
|
||||||
raise IndexError
|
raise ValueError
|
||||||
index = self.positional_arguments.index(e.name)
|
index = self.positional_arguments.index(e.name)
|
||||||
except IndexError:
|
except ValueError:
|
||||||
cli_name = knob_cls.cli_name or e.name.replace('_', '-')
|
cli_name = knob_cls.cli_name or e.name.replace('_', '-')
|
||||||
desc = "option --{0}".format(cli_name)
|
desc = "option --{0}".format(cli_name)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user