Bug 1108399 - Properly name command help function; r=ahal

We will soon have proper sub-commands. Let's fix function names.

--HG--
extra : rebase_source : 1cb0c008ecc0d2159dd799e76adad4892d65f119
extra : histedit_source : 9472b2d2609224b011eca04385cf9d5a49986864
This commit is contained in:
Gregory Szorc 2014-12-06 21:58:46 -08:00
parent d57b022a92
commit 66816678e1

View File

@ -95,13 +95,13 @@ class CommandAction(argparse.Action):
if command == 'help':
if args and args[0] not in ['-h', '--help']:
# Make sure args[0] is indeed a command.
self._handle_subcommand_help(parser, args[0])
self._handle_command_help(parser, args[0])
else:
self._handle_main_help(parser, namespace.verbose)
sys.exit(0)
elif '-h' in args or '--help' in args:
# -h or --help is in the command arguments.
self._handle_subcommand_help(parser, command)
self._handle_command_help(parser, command)
sys.exit(0)
else:
raise NoCommandError()
@ -246,7 +246,7 @@ class CommandAction(argparse.Action):
parser.print_help()
def _handle_subcommand_help(self, parser, command):
def _handle_command_help(self, parser, command):
handler = self._mach_registrar.command_handlers.get(command)
if not handler: