summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-10-02 17:46:48 -0600
committerJason Gerard DeRose <jderose@redhat.com>2008-10-02 17:46:48 -0600
commit993b9f4f63c9868042c96db8c5797a5005331d12 (patch)
tree2247e14b7495fe31cf3093a76d54b67a56153670
parent149429f3057e3ae934e660e3276c9e8d3c935d17 (diff)
downloadfreeipa-993b9f4f63c9868042c96db8c5797a5005331d12.tar.gz
freeipa-993b9f4f63c9868042c96db8c5797a5005331d12.tar.xz
freeipa-993b9f4f63c9868042c96db8c5797a5005331d12.zip
Command.get_default() now only returns a defaults for required values
-rw-r--r--ipalib/frontend.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 6decb17db..ed28a4ac9 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -522,7 +522,7 @@ class Command(plugable.Plugin):
def __get_default_iter(self, kw):
for param in self.params():
- if param.name not in kw:
+ if param.required and kw.get(param.name, None) is None:
yield (param.name, param.get_default(**kw))
def get_default(self, **kw):