2
0
mirror of https://github.com/mbusb/multibootusb synced 2024-11-18 15:25:46 +00:00

grub.py: display human readable size

This commit is contained in:
Alin Trăistaru 2017-05-02 21:23:36 +03:00
parent 4dbf85d4f1
commit f3c0b800ee

View File

@ -11,6 +11,7 @@ from . import config
from . import iso from . import iso
from . import _7zip from . import _7zip
from . import gen from . import gen
from .usb import bytes2human
def mbusb_update_grub_cfg(): 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): 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)) gen.log('size of the ISO is ' + str(iso_size_mb))
if distro == 'sgrubd2' or distro == 'raw_iso': if distro == 'sgrubd2' or distro == 'raw_iso':
grub_raw_iso(mbus_grub_cfg_path) grub_raw_iso(mbus_grub_cfg_path)