summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-06-23 12:14:38 +0200
committerJan Cholasta <jcholast@redhat.com>2016-06-27 16:42:42 +0200
commit055dfaf65725bec60e2e85273ec10ce027798fde (patch)
tree70062e6d490f07fe9ee7df13b37560d787deea36
parentac8e8ecdd3f75c104e30f68630290b0b1ad5a40b (diff)
downloadfreeipa-055dfaf65725bec60e2e85273ec10ce027798fde.tar.gz
freeipa-055dfaf65725bec60e2e85273ec10ce027798fde.tar.xz
freeipa-055dfaf65725bec60e2e85273ec10ce027798fde.zip
schema: do not crash in command_defaults if argument is None
https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
-rw-r--r--ipaserver/plugins/schema.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py
index c3a0e60ba..96a822491 100644
--- a/ipaserver/plugins/schema.py
+++ b/ipaserver/plugins/schema.py
@@ -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)