mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
cli: make optional positional command arguments actually optional
Fix commands defined in ipalib.cli not to assume optional positional arguments have a value of None when not specified. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
e9f0e9d8fa
commit
748a4c31bf
@ -773,7 +773,7 @@ class help(frontend.Local):
|
||||
|
||||
super(help, self)._on_finalize()
|
||||
|
||||
def run(self, key, outfile=None, **options):
|
||||
def run(self, key=None, outfile=None, **options):
|
||||
if outfile is None:
|
||||
outfile = sys.stdout
|
||||
writer = self._writer(outfile)
|
||||
@ -923,7 +923,7 @@ class show_api(frontend.Command):
|
||||
|
||||
takes_args = ('namespaces*',)
|
||||
|
||||
def run(self, namespaces):
|
||||
def run(self, namespaces=None):
|
||||
if namespaces is None:
|
||||
names = tuple(self.api)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user