mirror of https://github.com/vacp2p/research.git
fmt
This commit is contained in:
parent
fea47d3b07
commit
9232b18733
|
@ -12,7 +12,7 @@ class bcolors:
|
||||||
def sizeof_fmt(num):
|
def sizeof_fmt(num):
|
||||||
for x in ['bytes','KB','MB','GB','TB']:
|
for x in ['bytes','KB','MB','GB','TB']:
|
||||||
if num < 1024.0:
|
if num < 1024.0:
|
||||||
return "%3.1f%s" % (num, x)
|
return "%6.1f%s" % (num, x)
|
||||||
num /= 1024.0
|
num /= 1024.0
|
||||||
|
|
||||||
def magnitude_fmt(num):
|
def magnitude_fmt(num):
|
||||||
|
|
Loading…
Reference in New Issue