Use bytes when writing strings in mk-s390-cdboot (#1504026)

python3 needs bytes when calling .write()
This commit is contained in:
Brian C. Lane 2017-10-19 14:37:12 -07:00
parent 11e3fdadbb
commit 6147d58ccf
1 changed files with 2 additions and 2 deletions

View File

@ -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():