summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/argparse_oe.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py
index 75002d02af..2185a66cd8 100644
--- a/scripts/lib/argparse_oe.py
+++ b/scripts/lib/argparse_oe.py
@@ -14,6 +14,7 @@ class ArgumentParser(argparse.ArgumentParser):
14 kwargs.setdefault('formatter_class', OeHelpFormatter) 14 kwargs.setdefault('formatter_class', OeHelpFormatter)
15 self._subparser_groups = OrderedDict() 15 self._subparser_groups = OrderedDict()
16 super(ArgumentParser, self).__init__(*args, **kwargs) 16 super(ArgumentParser, self).__init__(*args, **kwargs)
17 self._optionals.title = 'options'
17 18
18 def error(self, message): 19 def error(self, message):
19 """error(message: string) 20 """error(message: string)
@@ -93,10 +94,6 @@ class ArgumentSubParser(ArgumentParser):
93 if 'order' in kwargs: 94 if 'order' in kwargs:
94 self._order = kwargs.pop('order') 95 self._order = kwargs.pop('order')
95 super(ArgumentSubParser, self).__init__(*args, **kwargs) 96 super(ArgumentSubParser, self).__init__(*args, **kwargs)
96 for agroup in self._action_groups:
97 if agroup.title == 'optional arguments':
98 agroup.title = 'options'
99 break
100 97
101 def parse_known_args(self, args=None, namespace=None): 98 def parse_known_args(self, args=None, namespace=None):
102 # This works around argparse not handling optional positional arguments being 99 # This works around argparse not handling optional positional arguments being