X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=db067d4d8964671a33379dfc2bf99a6c8bdd102e;hp=b12cf88db62b2e380214eb715cd7692267bf0102;hb=25c3bf7f43e285c2a6ab997a44efd8d21a514207;hpb=9586781bea4d64c8ab13a3c5fa46223c147219d5 diff --git a/grml2usb b/grml2usb index b12cf88..db067d4 100755 --- a/grml2usb +++ b/grml2usb @@ -804,9 +804,7 @@ def check_for_fat(partition): " (wrong UID/permissions or device/directory not present?)" % partition) try: - udev_info = subprocess.Popen(["/sbin/blkid", "-s", "TYPE", "-o", "value", partition], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) - filesystem = udev_info.communicate()[0].rstrip() + filesystem = subprocess.check_output(["/sbin/blkid", "-s", "TYPE", "-o", "value", partition]).decode().rstrip() if filesystem != "vfat": raise CriticalException( @@ -814,7 +812,7 @@ def check_for_fat(partition): "(Use --fat16 or run mkfs.vfat %s)" % (partition, partition)) except OSError: - raise CriticalException("Sorry, /sbin/blkid not available (install e2fsprogs?)") + raise CriticalException("Sorry, /sbin/blkid not available (install util-linux?)") def mkdir(directory): @@ -1690,7 +1688,7 @@ def handle_mbr(device): mbrcode = mbrpath break - if mbrcode is "": + if not mbrcode: str_locations = " or ".join(['"%s"' % l for l in mbr_locations]) logging.error('Cannot find syslinux MBR, install it at %s)', str_locations)