diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-02-19 22:38:54 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-21 09:32:42 +0000 |
commit | 6bd88e61713f790ff8f69927de2df8529f73e04f (patch) | |
tree | 6c7c2960e1081c14dbd7cf7c60dc2c7881ff25c2 | |
parent | 32ef52389833a8b8dfb63444ace6561bb0ac741c (diff) | |
download | poky-6bd88e61713f790ff8f69927de2df8529f73e04f.tar.gz |
scripts/lib/argparse_oe: tweak title above options
Naming these as "optional arguments" is perhaps slightly confusing since
some of the positional arguments might also be optional; in addition
it's rare (though possible) for options to be mandatory - up until
recently we had a recipetool option (-o) that was mandatory. It's not
perfect, but change it to "options" so it's at least a bit more
appropriate.
(From OE-Core rev: 55e675de6191bf7eccd26df29189f2a6faa40a20)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/argparse_oe.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py index 744cfe312f..bf3ebaddfd 100644 --- a/scripts/lib/argparse_oe.py +++ b/scripts/lib/argparse_oe.py | |||
@@ -51,6 +51,10 @@ class ArgumentSubParser(ArgumentParser): | |||
51 | if 'order' in kwargs: | 51 | if 'order' in kwargs: |
52 | self._order = kwargs.pop('order') | 52 | self._order = kwargs.pop('order') |
53 | super(ArgumentSubParser, self).__init__(*args, **kwargs) | 53 | super(ArgumentSubParser, self).__init__(*args, **kwargs) |
54 | for agroup in self._action_groups: | ||
55 | if agroup.title == 'optional arguments': | ||
56 | agroup.title = 'options' | ||
57 | break | ||
54 | 58 | ||
55 | def parse_known_args(self, args=None, namespace=None): | 59 | def parse_known_args(self, args=None, namespace=None): |
56 | # This works around argparse not handling optional positional arguments being | 60 | # This works around argparse not handling optional positional arguments being |