Use bytes when writing strings in mk-s390-cdboot (#1504026)
python3 needs bytes when calling .write()
This commit is contained in:
parent
11e3fdadbb
commit
6147d58ccf
@ -77,12 +77,12 @@ def configure_kernel(outfile, parmfile, size):
|
||||
|
||||
# Erase the previous COMMAND_LINE, write zeros
|
||||
out_fd.seek(KERNEL_CMDLINE)
|
||||
out_fd.write("\0" * KERNEL_CMDLINE_SIZE)
|
||||
out_fd.write(bytes(KERNEL_CMDLINE_SIZE))
|
||||
|
||||
# Write the first line of the parmfile
|
||||
cmdline = open(parmfile, "r").readline().strip()
|
||||
out_fd.seek(KERNEL_CMDLINE)
|
||||
out_fd.write(cmdline)
|
||||
out_fd.write(bytes(cmdline, "utf-8"))
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user