From: Michael Prokop Date: Wed, 30 Oct 2019 17:45:56 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/pr/24' X-Git-Tag: v0.17.0~5 X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=6fd18cafa8da27f32bb4d9f4199792ee112ce62a;hp=24bebddedf8f76f0f9e9db46a04a13df84d1ba0d Merge remote-tracking branch 'origin/pr/24' --- diff --git a/grml2usb b/grml2usb index 3585976..75fcd3e 100755 --- a/grml2usb +++ b/grml2usb @@ -389,7 +389,7 @@ def check_boot_flag(device): except ImportError as e: logging.debug("could not import parted, falling back to old bootflag detection") - with open(boot_dev, 'r') as image: + with open(boot_dev, 'rb') as image: data = image.read(520) bootcode = data[440:] gpt_data = bootcode[70:80] @@ -790,7 +790,7 @@ def check_for_fat(partition): try: udev_info = subprocess.Popen(["/sbin/blkid", "-s", "TYPE", "-o", "value", partition], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) filesystem = udev_info.communicate()[0].rstrip() if filesystem != "vfat":