Skip to content

Commit

Permalink
added: missing units (fixes #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schluggi authored Sep 9, 2021
1 parent c01c63d commit 40b0675
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def imaperror_decode(e):


def beautysized(b, factor=1000, precision=1):
units = ['B', 'KB', 'MB', 'GB']
units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']
if factor == 1024:
units = ['B', 'KiB', 'MiB', 'GiB']
units = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB']
template = '{:.?f} {}'.replace('?', str(precision))
rv = 0

Expand Down

0 comments on commit 40b0675

Please sign in to comment.