Skip to content

Commit

Permalink
Merge pull request #4 from roskakori/41-cleanup-progress
Browse files Browse the repository at this point in the history
xtream1101#41 Clean up alignment of progress percentage.
  • Loading branch information
missytake authored Jan 31, 2022
2 parents 9e94440 + 415ef1c commit c056186
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 @@ -403,8 +403,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 c056186

Please sign in to comment.