From f3c0b800ee046156cdf336dafe5b221177e1de7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alin=20Tr=C4=83istaru?= Date: Tue, 2 May 2017 21:23:36 +0300 Subject: [PATCH] grub.py: display human readable size --- scripts/grub.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/grub.py b/scripts/grub.py index 41f77ca..cd909a0 100644 --- a/scripts/grub.py +++ b/scripts/grub.py @@ -11,6 +11,7 @@ from . import config from . import iso from . import _7zip from . import gen +from .usb import bytes2human def mbusb_update_grub_cfg(): @@ -141,7 +142,7 @@ def get_grub_cfg(iso_link, efi=True): def grub_custom_menu(mbus_grub_cfg_path, distro): - iso_size_mb = iso.iso_size(config.image_path) / (1024.0 * 1024.0) + iso_size_mb = bytes2human(iso.iso_size(config.image_path)) gen.log('size of the ISO is ' + str(iso_size_mb)) if distro == 'sgrubd2' or distro == 'raw_iso': grub_raw_iso(mbus_grub_cfg_path)