Fix readable_size by coercing values to int

This commit is contained in:
Tom Marshall 2021-04-26 11:05:59 -07:00
parent 15078c96e2
commit ecf6c6fd77
1 changed files with 2 additions and 2 deletions

4
vmmd
View File

@ -212,8 +212,8 @@ def readable_size(val, scale=1):
else:
d = (1 << 40)
m = 'TB'
i = (n / d)
f = (n - (i * d)) / (d / 100)
i = int(n / d)
f = int((n - (i * d)) / (d / 100))
return "%d.%02d %s" % (i, f, m)
def readable_time(val):