diff --git a/fairtally/cli.py b/fairtally/cli.py index 84ade5f..a6816d2 100644 --- a/fairtally/cli.py +++ b/fairtally/cli.py @@ -33,7 +33,7 @@ def cli(urls, input_file, output_format, output_filename): sys.exit(1) url_progressbar = tqdm(all_urls, bar_format="fairtally progress: |{bar}| {n_fmt}/{total_fmt}", ncols=70, position=0) - current_value = tqdm(total=0, bar_format="{desc}", position=1) + current_value = tqdm(total=0, bar_format="{desc}", position=1, leave=False) results = [check_url(url, current_value) for url in url_progressbar] if output_filename == DEFAULT_OUTPUT_FILENAME and output_format == "json": @@ -48,6 +48,6 @@ def cli(urls, input_file, output_format, output_filename): click.echo("Unsupported format", err=True) sys.exit(1) + current_value.clear() msg = f"Completed fairtally on {len(all_urls)} URLs and written report to {output_filename}" - current_value.set_description_str(msg) - current_value.close() + click.echo(msg, err=True)