From 3c62ce27f659392b04bd57a64223c6e47fd4adb0 Mon Sep 17 00:00:00 2001 From: ForestLee Date: Mon, 1 May 2017 11:01:34 +0800 Subject: delete bash_completion in subcommand There are two "completion" in the subcommand table: bash-completion and bash_completion. but "bash_completion" is not in help information and it is repeated with "bash-completion", so delete it. Change-Id: I5f3bc918a1ce5b6283cc865db4383f128b138d5e Closes-Bug: #1670123 --- ceilometerclient/shell.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ceilometerclient/shell.py b/ceilometerclient/shell.py index 0b3002c..799a537 100644 --- a/ceilometerclient/shell.py +++ b/ceilometerclient/shell.py @@ -117,19 +117,9 @@ class CeilometerShell(object): version, 'shell') self._find_actions(subparsers, submodule) self._find_actions(subparsers, self) - self._add_bash_completion_subparser(subparsers) return parser - def _add_bash_completion_subparser(self, subparsers): - subparser = subparsers.add_parser( - 'bash_completion', - add_help=False, - formatter_class=HelpFormatter - ) - self.subcommands['bash_completion'] = subparser - subparser.set_defaults(func=self.do_bash_completion) - def _find_actions(self, subparsers, actions_module): for attr in (a for a in dir(actions_module) if a.startswith('do_')): # I prefer to be hypen-separated instead of underscores. @@ -243,7 +233,6 @@ class CeilometerShell(object): options.add(option) commands.remove('bash-completion') - commands.remove('bash_completion') print(' '.join(commands | options)) @utils.arg('command', metavar='', nargs='?', -- cgit v1.2.1