diff --git a/src/cryptobox/core/tools.py b/src/cryptobox/core/tools.py index 1aebd4e..0a28f6a 100644 --- a/src/cryptobox/core/tools.py +++ b/src/cryptobox/core/tools.py @@ -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