@bowlofeggs says we'll need these, so let's add gigantic size suffixes
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
15f41a1943
commit
bb9d9dc0c8
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ def collect_stats(stats):
|
||||||
|
|
||||||
|
|
||||||
def to_human(num_bytes):
|
def to_human(num_bytes):
|
||||||
ranges = ['B', 'KiB', 'MiB', 'GiB', 'TiB']
|
ranges = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
|
||||||
cur_range = 0
|
cur_range = 0
|
||||||
while num_bytes >= 1024 and cur_range+1 <= len(ranges):
|
while num_bytes >= 1024 and cur_range+1 <= len(ranges):
|
||||||
num_bytes = num_bytes / 1024
|
num_bytes = num_bytes / 1024
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue