[Git-commits] [grml/grml2usb] 5b2ffe: check_for_fat: Avoid comparing strings and bytes
Michael Prokop
noreply at github.com
Wed Oct 30 18:46:45 CET 2019
Branch: refs/heads/master
Home: https://github.com/grml/grml2usb
Commit: 5b2ffe433479368d711a63d985b926966940cad5
https://github.com/grml/grml2usb/commit/5b2ffe433479368d711a63d985b926966940cad5
Author: Sven Joachim <svenjoac at gmx.de>
Date: 2019-10-30 (Wed, 30 Oct 2019)
Changed paths:
M grml2usb
Log Message:
-----------
check_for_fat: Avoid comparing strings and bytes
By default Subprocess.open() opens file objects in binary mode, so the
"filesystem" variable is an array of bytes, and comparing it to a
string always yields false. Fix that by explicitly opening the stream
in text mode.
Commit: c2e742a6dc8a594f71fb7cf0b3233f31f48935de
https://github.com/grml/grml2usb/commit/c2e742a6dc8a594f71fb7cf0b3233f31f48935de
Author: Sven Joachim <svenjoac at gmx.de>
Date: 2019-10-30 (Wed, 30 Oct 2019)
Changed paths:
M grml2usb
Log Message:
-----------
check_boot_flag(): Open device in binary mode
By default open() reads in text which is not going to fly for a boot
sector.
Fatal: 'utf-8' codec can't decode byte 0x90 in position 6: invalid start byte
Exception:
Traceback (most recent call last):
File "/usr/sbin/grml2usb", line 1913, in main
install(iso, device)
File "/usr/sbin/grml2usb", line 1626, in install
install_grml(iso_mountpoint, device)
File "/usr/sbin/grml2usb", line 1653, in install_grml
check_boot_flag(device)
File "/usr/sbin/grml2usb", line 393, in check_boot_flag
data = image.read(520)
File "/usr/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 6: invalid start byte
Commit: 6fd18cafa8da27f32bb4d9f4199792ee112ce62a
https://github.com/grml/grml2usb/commit/6fd18cafa8da27f32bb4d9f4199792ee112ce62a
Author: Michael Prokop <mika at grml.org>
Date: 2019-10-30 (Wed, 30 Oct 2019)
Changed paths:
M grml2usb
Log Message:
-----------
Merge remote-tracking branch 'origin/pr/24'
Compare: https://github.com/grml/grml2usb/compare/24bebddedf8f...6fd18cafa8da
More information about the Git-commits
mailing list