dom0/utils: minor for for parse_size
This commit is contained in:
parent
191967fd41
commit
d969d2b863
@ -78,7 +78,7 @@ def parse_size(size):
|
|||||||
|
|
||||||
size = size.strip().upper()
|
size = size.strip().upper()
|
||||||
if size.isdigit():
|
if size.isdigit():
|
||||||
return size
|
return int(size)
|
||||||
|
|
||||||
for unit, multiplier in units:
|
for unit, multiplier in units:
|
||||||
if size.endswith(unit):
|
if size.endswith(unit):
|
||||||
|
Loading…
Reference in New Issue
Block a user