X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=223dae2a81c8e7c9d04cd9273b93b0659eafbafa;hp=6a8ada236700e7d8f40df700a1f6614ceb916a06;hb=9e7dd969c917d32365f2acb714c5c28e9c450dd3;hpb=67809e1cd9690cbd9f12fde6f20775e24df8548d diff --git a/grml2usb b/grml2usb index 6a8ada2..223dae2 100755 --- a/grml2usb +++ b/grml2usb @@ -503,6 +503,12 @@ def get_partition_for_path(path): def check_boot_flag(device): + if os.path.isdir(device): + logging.debug( + "Device %s is a directory, skipping check for boot flag." % device + ) + return + boot_dev, x = get_device_from_partition(device) logging.info("Checking for boot flag") @@ -912,7 +918,7 @@ def mount(source, target, mount_options): if x.startswith(source): raise CriticalException( ( - "Error executing mount: %s already mounted - " + "Error executing mount: {0} already mounted - " "please unmount before invoking grml2usb" ).format(source) ) @@ -1947,7 +1953,7 @@ def handle_mbr(device): break if not mbrcode: - str_locations = " or ".join(['"%s"' % l for l in mbr_locations]) + str_locations = " or ".join(['"%s"' % x for x in mbr_locations]) logging.error("Cannot find syslinux MBR, install it at %s)", str_locations) raise CriticalException( "syslinux MBR can not be found at %s." % str_locations