archive
/
md-pdf
Archived
1
Fork 0

Dont update the bar without size

This commit is contained in:
Jake Howard 2017-05-04 08:39:38 +01:00
parent 9108301772
commit 88ad1fd6a5
1 changed files with 2 additions and 1 deletions

View File

@ -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()