fix broken typing in get_blockdevice_size_humanly (thanks to Steffen for reporting)
This commit is contained in:
parent
fac3fbc76a
commit
2ce5e0fab6
|
@ -213,7 +213,7 @@ def is_part_of_blockdevice(parent, subdevice):
|
|||
|
||||
|
||||
def get_blockdevice_size(device):
|
||||
"""Return the size of a blockdevice.
|
||||
"""Return the size of a blockdevice in megabyte.
|
||||
"""
|
||||
if not device:
|
||||
return -1
|
||||
|
@ -240,7 +240,7 @@ def get_blockdevice_size_humanly(device):
|
|||
"""
|
||||
size = get_blockdevice_size(device)
|
||||
if size > 5120:
|
||||
return "%sGB" % size/1024
|
||||
return "%dGB" % int(size/1024)
|
||||
else:
|
||||
return "%sMB" % size
|
||||
return "%dMB" % size
|
||||
|
||||
|
|
Loading…
Reference in a new issue