diff options
author | Christian Berendt <berendt@b1-systems.de> | 2014-06-04 21:15:17 +0200 |
---|---|---|
committer | Christian Berendt <berendt@b1-systems.de> | 2014-06-05 07:27:53 +0200 |
commit | 12d484160c3b3367bd2cfc6eeb5f6ec7669252a6 (patch) | |
tree | f4b9d2a4b9edc22022a760bc39218a4993c6bf86 | |
parent | 68a6424256b0053fe554c1cf2101e95d60fe1c14 (diff) | |
download | python-troveclient-12d484160c3b3367bd2cfc6eeb5f6ec7669252a6.tar.gz |
Overwrite HelpFormatter constructur to extend argument column
Overwrite the HelpFormatter constructor in the class
OpenStackHelpFormatter to modify the default value of the
max_help_position to extend the width of the argument column
in the help output.
example output before this patch:
configuration-attach
Attaches a configuration group to an instance.
configuration-create
Creates a configuration group.
configuration-default
Shows the default configuration of an instance.
configuration-delete
Deletes a configuration group.
configuration-detach
Detaches a configuration group from an instance.
example output after this patch:
configuration-attach Attaches a configuration group to an
instance.
configuration-create Creates a configuration group.
configuration-default Shows the default configuration of an
instance.
configuration-delete Deletes a configuration group.
configuration-detach Detaches a configuration group from an
instance.
Change-Id: Ia3ad8e9fefca6da40f55ab3de902c015a0d17006
Closes-Bug: #1326471
-rw-r--r-- | troveclient/shell.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/troveclient/shell.py b/troveclient/shell.py index 46bbf2d..7e21817 100644 --- a/troveclient/shell.py +++ b/troveclient/shell.py @@ -501,6 +501,11 @@ class OpenStackTroveShell(object): # I'm picky about my shell help. class OpenStackHelpFormatter(argparse.HelpFormatter): + def __init__(self, prog, indent_increment=2, max_help_position=34, + width=None): + super(OpenStackHelpFormatter, self).__init__(prog, indent_increment, + max_help_position, width) + def start_section(self, heading): # Title-case the headings heading = '%s%s' % (heading[0].upper(), heading[1:]) |