diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-13 20:31:10 -0600 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-13 20:31:10 -0600 |
commit | b6dcd183a66ca6056f9d23637de0f12aee15efcc (patch) | |
tree | c83a0c76e0f985d506f3462729defcfb53a90562 /ipalib/cli.py | |
parent | 8674086b8536f64947ca8cdb97d7a1cd3bf1c684 (diff) | |
download | freeipa.git-b6dcd183a66ca6056f9d23637de0f12aee15efcc.tar.gz freeipa.git-b6dcd183a66ca6056f9d23637de0f12aee15efcc.tar.xz freeipa.git-b6dcd183a66ca6056f9d23637de0f12aee15efcc.zip |
CLI now maps Param.cli_name to Param.name
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r-- | ipalib/cli.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py index aae4e31c..378cc4c1 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -321,7 +321,8 @@ class CLI(object): usage=self.get_usage(cmd), ) for option in cmd.options(): - parser.add_option('--%s' % to_cli(option.name), + parser.add_option('--%s' % to_cli(option.cli_name), + dest=option.name, metavar=option.type.name.upper(), help=option.doc, ) @@ -368,7 +369,7 @@ class CLI(object): def get_usage_iter(self, cmd): yield 'Usage: %%prog [global-options] %s' % to_cli(cmd.name) for arg in cmd.args(): - name = to_cli(arg.name).upper() + name = to_cli(arg.cli_name).upper() if arg.multivalue: name = '%s...' % name if arg.required: |