Bug 879406 - Unbust |mach help| when arguments are not prefixed with '-'; r=ted

DONTBUILD (NPOTB)
This commit is contained in:
Gregory Szorc 2013-06-14 09:44:33 -07:00
Родитель 9c73839633
Коммит 9b2727baba
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -177,8 +177,15 @@ class CommandAction(argparse.Action):
# just the command data then supplement the main help's output with
# this 2nd parser's. We use a custom formatter class to ignore some of
# the help output.
c_parser = argparse.ArgumentParser(formatter_class=CommandFormatter,
add_help=False)
parser_args = {
'formatter_class': CommandFormatter,
'add_help': False,
}
if handler.allow_all_arguments:
parser_args['prefix_chars'] = '+'
c_parser = argparse.ArgumentParser(**parser_args)
group = c_parser.add_argument_group('Command Arguments')