diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-17 18:50:30 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-17 18:50:30 -0700 |
commit | 8474bd01da13b9b72ba06e832d4c35ef6ccf5c9e (patch) | |
tree | 063573d060a7de4f2833a7a608b48f5d2719a435 /ipalib/cli.py | |
parent | 5c16047092652d2d56c86d83259c56eff883b485 (diff) | |
download | freeipa-8474bd01da13b9b72ba06e832d4c35ef6ccf5c9e.tar.gz freeipa-8474bd01da13b9b72ba06e832d4c35ef6ccf5c9e.tar.xz freeipa-8474bd01da13b9b72ba06e832d4c35ef6ccf5c9e.zip |
Command.get_defaults() now returns param.default if param.type is a Bool
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r-- | ipalib/cli.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py index 1c7256a2a..909e2acbc 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -693,8 +693,10 @@ class CLI(object): help=option.doc, ) if isinstance(option.type, ipa_types.Bool): - o.action = 'store_true' - o.default = option.default + if option.default is True: + o.action = 'store_false' + else: + o.action = 'store_true' o.type = None parser.add_option(o) return parser |