Mercurial > hg > configuration
changeset 15:0df4bfdc2c96
make --help work
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 26 Mar 2012 10:41:38 -0700 |
parents | 12162afcd78f |
children | b7e7f450ad1a |
files | configuration/config.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/configuration/config.py Mon Mar 26 10:39:59 2012 -0700 +++ b/configuration/config.py Mon Mar 26 10:41:38 2012 -0700 @@ -93,6 +93,7 @@ parser_args['formatter'] = PlainDescriptionFormatter() parser = optparse.OptionParser(**parser_args) for key, value in self.items(): + # TODO: move adding options to a separate function # CLI arguments args = value.get('flags', ['--%s' % key]) @@ -109,8 +110,10 @@ # - http://k0s.org/mozilla/hg/bzconsole/file/d5e88dadde69/bzconsole/command.py#l12 help += ' [DEFAULT: %s]' % value['default'] + kw['help'] = help kw['action'] = 'store' # TODO: types parser.add_option(*args, **kw) + return parser def main(args=sys.argv[:]):