diff options
Diffstat (limited to 'ceilometerclient/shell.py')
-rw-r--r-- | ceilometerclient/shell.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/ceilometerclient/shell.py b/ceilometerclient/shell.py index 138dd62..d16dc51 100644 --- a/ceilometerclient/shell.py +++ b/ceilometerclient/shell.py @@ -256,17 +256,10 @@ class CeilometerShell(object): class HelpFormatter(argparse.HelpFormatter): - INDENT_BEFORE_ARGUMENTS = 6 - MAX_WIDTH_ARGUMENTS = 32 - - def add_arguments(self, actions): - for action in filter(lambda x: not x.option_strings, actions): - for choice in action.choices: - length = len(choice) + self.INDENT_BEFORE_ARGUMENTS - if(length > self._max_help_position and - length <= self.MAX_WIDTH_ARGUMENTS): - self._max_help_position = length - super(HelpFormatter, self).add_arguments(actions) + def __init__(self, prog, indent_increment=2, max_help_position=32, + width=None): + super(HelpFormatter, self).__init__(prog, indent_increment, + max_help_position, width) def start_section(self, heading): # Title-case the headings |