From 83118620d22fb26147da2455a4828b8237b9b370 Mon Sep 17 00:00:00 2001 From: Masayuki Igawa Date: Mon, 29 Jul 2013 14:36:31 +0900 Subject: [PATCH] Fix the help text process and the generated wrong help The wrong help text of bash-completion is generated by the process of choosing first line from the source code comment. We should get the all help text from the source code comment, and use it. So this commit removes this unnecessary process, and also fix the README.rst for proper help text. Fixes bug 1206005 Change-Id: Id4f5b6a7722197f09eb366ba8f3e643e1af91805 --- README.rst | 3 ++- novaclient/shell.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 6207d89f0..1dbcc0049 100644 --- a/README.rst +++ b/README.rst @@ -198,7 +198,8 @@ You'll find complete documentation on the shell by running x509-create-cert Create x509 cert for a user in tenant x509-get-root-cert Fetches the x509 root cert. bash-completion Prints all of the commands and options to stdout so - that the + that the nova.bash_completion script doesn't have to + hard code them. help Display help about this program or one of its subcommands. diff --git a/novaclient/shell.py b/novaclient/shell.py index 198c42fc5..7f3257155 100644 --- a/novaclient/shell.py +++ b/novaclient/shell.py @@ -469,7 +469,7 @@ class OpenStackComputeShell(object): command = attr[3:].replace('_', '-') callback = getattr(actions_module, attr) desc = callback.__doc__ or '' - action_help = desc.strip().split('\n')[0] + action_help = desc.strip() arguments = getattr(callback, 'arguments', []) subparser = subparsers.add_parser(command,