Skip to content

Commit

Permalink
xtream1101#41 Clean up alignment of progress percentage.
Browse files Browse the repository at this point in the history
  • Loading branch information
roskakori committed May 30, 2021
1 parent 95302d8 commit 415ef1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions humblebundle_downloader/download_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ def _download_file(self, product_r, local_filename):
pb_width = 50
done = int(pb_width * dl / total_length)
if self.progress_bar:
print("\t{percent}% [{filler}{space}]"
.format(percent=int(done * (100 / pb_width)),
print("\t{percent:3d}% [{filler}{space}]"
.format(percent=done * 100 // pb_width,
filler='=' * done,
space=' ' * (pb_width - done),
), end='\r')
Expand Down

0 comments on commit 415ef1c

Please sign in to comment.