summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForestLee <lichl@hotmail.com>2017-05-01 11:01:34 +0800
committerForestLee <lichl@hotmail.com>2017-05-01 11:07:48 +0800
commit3c62ce27f659392b04bd57a64223c6e47fd4adb0 (patch)
treead2b6f5950c6dea0ced006df737af889e524a81d
parent6fcc675245677d581e7aca86757f2f9646d84210 (diff)
downloadpython-ceilometerclient-3c62ce27f659392b04bd57a64223c6e47fd4adb0.tar.gz
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
-rw-r--r--ceilometerclient/shell.py11
1 files changed, 0 insertions, 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='<subcommand>', nargs='?',