[svn r62977] actually make use of option group description

--HG--
branch : trunk
This commit is contained in:
hpk 2009-03-16 22:15:52 +01:00
parent f01040b193
commit 2aea0a73e2
1 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,8 @@ class Parser:
optparser = optparse.OptionParser(usage=self._usage)
for group in self._groups:
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)
optparser.add_option_group(optgroup)
return optparser.parse_args([str(x) for x in args])