schema: do not crash in command_defaults if argument is None

https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta 2016-06-23 12:14:38 +02:00
parent ac8e8ecdd3
commit 055dfaf657

View File

@ -266,8 +266,8 @@ class command_defaults(PKQuery):
def execute(self, name, **options):
command = self.api.Command[name]
params = options.get('params', [])
kw = options.get('kw', {})
params = options.get('params') or []
kw = options.get('kw') or {}
result = command.get_default(params, **kw)