]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
scripts: ensure not specifying subcommand shows help text paule/devtool17-oe
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 13 Jun 2016 04:01:30 +0000 (16:01 +1200)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 13 Jun 2016 04:13:14 +0000 (16:13 +1200)
commit21633d8f3c95add3368d782ad8fb4cb2540e97f2
tree0904482a542005dd5bec7416d1e6d70c95548962
parent51df8170189201b5141824cdd19274c491a41899
scripts: ensure not specifying subcommand shows help text

With Python 2, argparse subparsers behaviour in Python 2 was to print
the usage information if the subparsers argument wasn't specified.
However, with Python 3.2.3 and later a subparsers argument is not
required by default, leading to errors when no arguments are specified:

  AttributeError: 'Namespace' object has no attribute 'func'

Restore the previous desired behaviour of showing the help text for
devtool, recipetool and the devtool-stress script by setting
subparsers.required to True.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
scripts/contrib/devtool-stress.py
scripts/devtool
scripts/recipetool