[svn r62977] actually make use of option group description
--HG-- branch : trunk
This commit is contained in:
parent
f01040b193
commit
2aea0a73e2
|
@ -52,7 +52,8 @@ class Parser:
|
||||||
optparser = optparse.OptionParser(usage=self._usage)
|
optparser = optparse.OptionParser(usage=self._usage)
|
||||||
for group in self._groups:
|
for group in self._groups:
|
||||||
if group.options:
|
if group.options:
|
||||||
optgroup = optparse.OptionGroup(optparser, group.name)
|
desc = group.description or group.name
|
||||||
|
optgroup = optparse.OptionGroup(optparser, desc)
|
||||||
optgroup.add_options(group.options)
|
optgroup.add_options(group.options)
|
||||||
optparser.add_option_group(optgroup)
|
optparser.add_option_group(optgroup)
|
||||||
return optparser.parse_args([str(x) for x in args])
|
return optparser.parse_args([str(x) for x in args])
|
||||||
|
|
Loading…
Reference in New Issue