# HG changeset patch # User Jeff Hammel # Date 1332783698 25200 # Node ID 0df4bfdc2c96e06197c5f63f7981b9bf57de92b4 # Parent 12162afcd78fa4ed0fc9fba3c55e2f7720be4f8e make --help work diff -r 12162afcd78f -r 0df4bfdc2c96 configuration/config.py --- 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[:]):