mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 14:06:58 +02:00
disk_util sometimes bails out during build with an ASCII conversion error: Traceback (most recent call last): File "/mnt/host/source/src/scripts/build_library/disk_util", line 1114, in <module> main(sys.argv) File "/mnt/host/source/src/scripts/build_library/disk_util", line 1110, in main options.func(options) File "/mnt/host/source/src/scripts/build_library/disk_util", line 779, in Verity Tune2fsReadWrite(options, part, disable_rw=True) File "/mnt/host/source/src/scripts/build_library/disk_util", line 716, in Tune2fsReadWrite image.write(chr(flag_value)) UnicodeEncodeError: 'ascii' codec can't encode character '\xff' in position 0: ordinal not in range(128) Curiously, the error does not reproduce every time (though the code leading to the error is straightforward). This change converts the integer to be written to a byte array (of size 1) instead of using chr(). Also, the file to be written is explicitly opened in binary mode. Signed-off-by: Thilo Fromm <thilo@kinvolk.io> |
||
---|---|---|
.. | ||
board_options.sh | ||
build_image_util.sh | ||
catalyst_sdk.sh | ||
catalyst_toolchains.sh | ||
catalyst.sh | ||
check_root | ||
configure_bootloaders.sh | ||
dev_container_util.sh | ||
disk_layout.json | ||
disk_util | ||
ebuild_aci_manifest.in | ||
ebuild_aci_util.sh | ||
gen_tmpfiles.py | ||
generate_au_zip.py | ||
generate_grub_hashes.py | ||
generate_kernel_hash.py | ||
grub_install.sh | ||
grub.cfg | ||
menu.lst | ||
modify_image_util.sh | ||
niftycloud_ovf.sh | ||
oem_aci_util.sh | ||
parallels_pvs.sh | ||
prod_image_util.sh | ||
qemu_template.sh | ||
release_util.sh | ||
set_lsb_release | ||
template_interoute.ovf | ||
template_vmware.ovf | ||
test_build_root | ||
test_image_content.sh | ||
test_oem_pkgs | ||
toolchain_util.sh | ||
torcx_manifest.sh | ||
virtualbox_ovf.sh | ||
vm_image_util.sh | ||
write_hdd.sh |