From 2ce5e0fab6a0688cda600b7c55e14534c0fef8b4 Mon Sep 17 00:00:00 2001 From: lars Date: Fri, 9 Feb 2007 20:40:01 +0000 Subject: [PATCH] fix broken typing in get_blockdevice_size_humanly (thanks to Steffen for reporting) --- src/cryptobox/core/tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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