Fix unit decimal prefix (KB->kB)

This commit is contained in:
jstasiak 2012-03-22 14:09:34 +11:00
parent dfe39ed160
commit eb8a19ab6f
1 changed files with 2 additions and 2 deletions

View File

@ -149,9 +149,9 @@ def format_size(bytes):
if bytes > 1000*1000:
return '%.1fMB' % (bytes/1000.0/1000)
elif bytes > 10*1000:
return '%iKB' % (bytes/1000)
return '%ikB' % (bytes/1000)
elif bytes > 1000:
return '%.1fKB' % (bytes/1000.0)
return '%.1fkB' % (bytes/1000.0)
else:
return '%ibytes' % bytes