Fixes test runner command line
test_runner.py --help would give 'Invalid command.' previously. NOTRY=True BUG= Review URL: https://chromiumcodereview.appspot.com/23294002 git-svn-id: http://src.chromium.org/svn/trunk/src/build@218057 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
ebaf5f95d7
Коммит
d1e0248baa
|
@ -734,6 +734,8 @@ def main(argv):
|
|||
command_list=VALID_COMMANDS.keys())
|
||||
|
||||
if len(argv) < 2 or argv[1] not in VALID_COMMANDS:
|
||||
# Parse args first, if this is '--help', optparse will display help and exit
|
||||
option_parser.parse_args(argv)
|
||||
option_parser.error('Invalid command.')
|
||||
command = argv[1]
|
||||
VALID_COMMANDS[command].add_options_func(option_parser)
|
||||
|
|
Загрузка…
Ссылка в новой задаче