|
|
@ -270,7 +270,7 @@ class ConfigCLI(CLI):
|
|
|
|
if not settings[setting].get('description'):
|
|
|
|
if not settings[setting].get('description'):
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
default = settings[setting].get('default', '')
|
|
|
|
default = self.config.template_default(settings[setting].get('default', ''), get_constants())
|
|
|
|
if subkey == 'env':
|
|
|
|
if subkey == 'env':
|
|
|
|
stype = settings[setting].get('type', '')
|
|
|
|
stype = settings[setting].get('type', '')
|
|
|
|
if stype == 'boolean':
|
|
|
|
if stype == 'boolean':
|
|
|
@ -352,7 +352,7 @@ class ConfigCLI(CLI):
|
|
|
|
if entry['key'] not in seen[entry['section']]:
|
|
|
|
if entry['key'] not in seen[entry['section']]:
|
|
|
|
seen[entry['section']].append(entry['key'])
|
|
|
|
seen[entry['section']].append(entry['key'])
|
|
|
|
|
|
|
|
|
|
|
|
default = opt.get('default', '')
|
|
|
|
default = self.config.template_default(opt.get('default', ''), get_constants())
|
|
|
|
if opt.get('type', '') == 'list' and not isinstance(default, string_types):
|
|
|
|
if opt.get('type', '') == 'list' and not isinstance(default, string_types):
|
|
|
|
# python lists are not valid ini ones
|
|
|
|
# python lists are not valid ini ones
|
|
|
|
default = ', '.join(default)
|
|
|
|
default = ', '.join(default)
|
|
|
@ -414,14 +414,16 @@ class ConfigCLI(CLI):
|
|
|
|
if context.CLIARGS['format'] == 'display':
|
|
|
|
if context.CLIARGS['format'] == 'display':
|
|
|
|
if isinstance(config[setting], Setting):
|
|
|
|
if isinstance(config[setting], Setting):
|
|
|
|
# proceed normally
|
|
|
|
# proceed normally
|
|
|
|
|
|
|
|
value = config[setting].value
|
|
|
|
if config[setting].origin == 'default':
|
|
|
|
if config[setting].origin == 'default':
|
|
|
|
color = 'green'
|
|
|
|
color = 'green'
|
|
|
|
|
|
|
|
value = self.config.template_default(value, get_constants())
|
|
|
|
elif config[setting].origin == 'REQUIRED':
|
|
|
|
elif config[setting].origin == 'REQUIRED':
|
|
|
|
# should include '_terms', '_input', etc
|
|
|
|
# should include '_terms', '_input', etc
|
|
|
|
color = 'red'
|
|
|
|
color = 'red'
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
color = 'yellow'
|
|
|
|
color = 'yellow'
|
|
|
|
msg = "%s(%s) = %s" % (setting, config[setting].origin, config[setting].value)
|
|
|
|
msg = "%s(%s) = %s" % (setting, config[setting].origin, value)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
color = 'green'
|
|
|
|
color = 'green'
|
|
|
|
msg = "%s(%s) = %s" % (setting, 'default', config[setting].get('default'))
|
|
|
|
msg = "%s(%s) = %s" % (setting, 'default', config[setting].get('default'))
|
|
|
|