@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:
Patrick Uiterwijk 2017-10-31 18:15:12 +00:00
parent 15f41a1943
commit bb9d9dc0c8

View file

@ -185,7 +185,7 @@ def collect_stats(stats):
def to_human(num_bytes):
ranges = ['B', 'KiB', 'MiB', 'GiB', 'TiB']
ranges = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
cur_range = 0
while num_bytes >= 1024 and cur_range+1 <= len(ranges):
num_bytes = num_bytes / 1024