When encountering an error, read_conf uses click.echo(...) to emit an
error message but then continue execution, causing the read_conf
method to throw an error of the form:
UnboundLocalError: local variable 'output' referenced before assignment
By raising click.ClickException instead of calling click.echo, we
ensure that pinhook exits with an error message (and no traceback).
When encountering an error, read_conf uses click.echo(...) to emit an error message but then continue execution, causing the read_conf method to throw an error of the form:
By raising click.ClickException instead of calling click.echo, we ensure that pinhook exits with an error message (and no traceback).