From 8474bd01da13b9b72ba06e832d4c35ef6ccf5c9e Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Mon, 17 Nov 2008 18:50:30 -0700 Subject: Command.get_defaults() now returns param.default if param.type is a Bool --- ipalib/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ipalib/cli.py') diff --git a/ipalib/cli.py b/ipalib/cli.py index 1c7256a2..909e2acb 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 -- cgit