mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
Changed CLI to allow to use FILE as optional param
This commit is contained in:
parent
db3e450732
commit
db7dbbb141
@ -1254,11 +1254,13 @@ class cli(backend.Executioner):
|
||||
raise ValidationError(
|
||||
name=to_cli(p.cli_name), error=e[1]
|
||||
)
|
||||
if not raw:
|
||||
raise ValidationError(
|
||||
name=to_cli(p.cli_name), error=_('No file to read')
|
||||
)
|
||||
kw[p.name] = self.Backend.textui.decode(raw)
|
||||
|
||||
if raw:
|
||||
kw[p.name] = self.Backend.textui.decode(raw)
|
||||
elif p.required:
|
||||
raise ValidationError(
|
||||
name=to_cli(p.cli_name), error=_('No file to read')
|
||||
)
|
||||
|
||||
|
||||
class IPAHelpFormatter(optparse.IndentedHelpFormatter):
|
||||
|
Loading…
Reference in New Issue
Block a user