2 Display the currently used configuration. The configuration for any
3 sub-command is normally given by options. But some options can be specified
4 using environment variables. This sub-command shows those variables.
5 A `set` sub-command should be provided when the configuration is in a real
6 configuration file instead of environment variables.
13 for x in ('database', 'addons', 'host', 'port'):
14 x_ = ('openerp_' + x).upper()
16 print '%s: %s' % (x, os.environ[x_])
18 print '%s: <not set>' % (x, )
19 os.environ['OPENERP_DATABASE'] = 'yeah'
21 def add_parser(subparsers):
22 parser = subparsers.add_parser('conf',
23 description='Display the currently used configuration.')
25 parser.set_defaults(run=run)