]> code.ossystems Code Review - openembedded-core.git/commit
scripts/lib/argparse_oe: show subparser help for unrecognized args
authorChristopher Larson <chris_larson@mentor.com>
Wed, 27 Apr 2016 23:23:59 +0000 (16:23 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 May 2016 09:30:56 +0000 (10:30 +0100)
commit7fdaaedf4c63c8d019f03f84e22f9b838ef19aa6
tree81f11f77234713010824fec3d1cc205c16c58da1
parentcf0c5175136966eefde8c0d9aa0679e85779f713
scripts/lib/argparse_oe: show subparser help for unrecognized args

As an example, `recipetool create foo bar baz` shows `recipetool: error:
unrecognized arguments: bar baz` and then displays the main help, not the help
for the create command. Fix by saving the subparser name and using it in
parse_args() to look up the subparser.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/argparse_oe.py