mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
frontend: do not forward unspecified positional arguments to server
When forwarding a command call to a server, do not use a value of None in place of unspecified positional arguments. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
71f960457e
commit
3eaafe42b5
@ -559,8 +559,21 @@ class Command(HasParam):
|
||||
"""
|
||||
Split params into (args, options).
|
||||
"""
|
||||
args = tuple(params.get(name, None) for name in self.args)
|
||||
args = tuple()
|
||||
options = dict(self.__params_2_options(params))
|
||||
|
||||
is_arg = True
|
||||
for name in self.args:
|
||||
try:
|
||||
value = params[name]
|
||||
except KeyError:
|
||||
is_arg = False
|
||||
continue
|
||||
if is_arg:
|
||||
args += (value,)
|
||||
else:
|
||||
options[name] = value
|
||||
|
||||
return (args, options)
|
||||
|
||||
def __params_2_options(self, params):
|
||||
|
Loading…
Reference in New Issue
Block a user