From 88ad1fd6a5a397605d76bb7f8c056144201434dc Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 4 May 2017 08:39:38 +0100 Subject: [PATCH] Dont update the bar without size --- md_pdf/csl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/md_pdf/csl.py b/md_pdf/csl.py index 42ab5e5..1d45830 100644 --- a/md_pdf/csl.py +++ b/md_pdf/csl.py @@ -26,7 +26,8 @@ def download_csl(): remove_dir(CSL_DIR) def download_handle(count, block_size, total_size): - print(count, block_size, total_size, int(count * block_size * 100 / total_size)) + if total_size < 1: # only update the bar if we have a size + return bar.update(int(count * block_size * 100 / total_size)) _, download_location = tempfile.mkstemp()