fix broken typing in get_blockdevice_size_humanly (thanks to Steffen for reporting)

This commit is contained in:
lars 2007-02-09 20:40:01 +00:00
parent fac3fbc76a
commit 2ce5e0fab6

View file

@ -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