From 6147d58ccfb888afc6d03c9881626d3d4a98ea3c Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 19 Oct 2017 14:37:12 -0700 Subject: [PATCH] Use bytes when writing strings in mk-s390-cdboot (#1504026) python3 needs bytes when calling .write() --- src/bin/mk-s390-cdboot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/mk-s390-cdboot b/src/bin/mk-s390-cdboot index 8a0361c2..c96653a8 100755 --- a/src/bin/mk-s390-cdboot +++ b/src/bin/mk-s390-cdboot @@ -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():