algent You might be on to something there
eopkg util.py
def human_readable_size(size = 0):
symbols, depth = [' B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], 0
while size > 1000 and depth < 8:
size = float(size / 1024)
depth += 1
Software Center util.py
def sc_format_size(size):
""" Get the *ibyte size (not megabyte.. 90s ended) format """
labels = ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
for i, label in enumerate(labels):
if size < 1024 or i == len(labels) - 1:
return size, label
size = float(size / 1000)
seems to me like the divisions are exactly the wrong way around; though after looking at it too long I'm not longer sure if I'm not missing something here ^^