Changeset - b1eee5119416
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2020-02-16 04:16:14
mads@kiilerich.com
config-create: show options used for generating .ini, and list what alternative values are supported

Give users a better hint that they should specify web server when generating .ini .
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/bin/kallithea_cli_config.py
Show inline comments
 
@@ -89,6 +89,16 @@ def config_create(config_file, key_value
 
    mako_variable_values.update({
 
        'uuid': lambda: uuid.uuid4().hex,
 
    })
 

	
 
    click.echo('Creating config file using:')
 
    for key, value in inifile.default_variables.items():
 
        if isinstance(value, str):
 
            options = inifile.variable_options.get(key)
 
            if options:
 
                click.echo('  %s=%s  (options: %s)' % (key, mako_variable_values.get(key, value), ', '.join(options)))
 
            else:
 
                click.echo('  %s=%s' % (key, mako_variable_values.get(key, value)))
 

	
 
    try:
 
        config_file_abs = os.path.abspath(config_file)
 
        inifile.create(config_file_abs, mako_variable_values, ini_settings)
0 comments (0 inline, 0 general)