mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-08 20:18:07 -05:00
install: fix command line option validation
The code which calls the validators was accidentally removed, re-add it. https://fedorahosted.org/freeipa/ticket/5386 https://fedorahosted.org/freeipa/ticket/5391 https://fedorahosted.org/freeipa/ticket/5392 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
@@ -282,7 +282,8 @@ class ConfigureTool(admintool.AdminTool):
|
||||
kwargs = {}
|
||||
|
||||
transformed_cls = self._transform(self.configurable_class)
|
||||
for owner_cls, name in transformed_cls.knobs():
|
||||
knob_classes = {n: getattr(c, n) for c, n in transformed_cls.knobs()}
|
||||
for name in knob_classes:
|
||||
value = getattr(self.options, name, None)
|
||||
if value is not None:
|
||||
kwargs[name] = value
|
||||
@@ -294,8 +295,10 @@ class ConfigureTool(admintool.AdminTool):
|
||||
try:
|
||||
cfgr = transformed_cls(**kwargs)
|
||||
except core.KnobValueError as e:
|
||||
knob_cls = getattr(transformed_cls, e.name)
|
||||
knob_cls = knob_classes[e.name]
|
||||
try:
|
||||
if self.positional_arguments is None:
|
||||
raise IndexError
|
||||
index = self.positional_arguments.index(e.name)
|
||||
except IndexError:
|
||||
cli_name = knob_cls.cli_name or e.name.replace('_', '-')
|
||||
|
||||
Reference in New Issue
Block a user