Smaller updates

This commit is contained in:
Schemen
2021-02-17 18:03:24 +01:00
parent 5cb64e377a
commit fdb8a72a0d
2 changed files with 25 additions and 2 deletions

View File

@@ -22,15 +22,16 @@ def read_config(file):
@click.option('-c', '--config', default="config.ini", help='give config file')
@click.pass_context
def cli(ctx, debug, config):
click.echo('Debug mode is %s' % ('on' if debug else 'off'))
ctx.ensure_object(dict)
ctx.obj['DEBUG'] = debug
ctx.obj['CONFIG'] = config
if debug:
click.echo("Debug is enabled")
@cli.command()
@click.pass_context
def verify(ctx):
"""verify your configuration"""
"""verify your configuration - does not do much yet!"""
config = read_config(ctx.obj['CONFIG'])
influx_host = env.get("InfluxdbHost", config['DEFAULT']['InfluxdbHost'])