--- parted-3.2/tests/gpt-header-move.old 2014-06-15 18:27:30.000000000 +0000 +++ parted-3.2/tests/gpt-header-move 2017-08-19 20:47:02.443283140 +0000 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # open img file, subtract 33 from altlba address, and move the last 33 sectors # back by 33 sectors @@ -11,12 +11,12 @@ file.seek(512) gptheader = file.read(512) altlba = unpack_from('" + print("%s: ") sys.exit(1) -data = "".join(chr(c) for c in BAD_ENTRY) +data = bytearray(BAD_ENTRY) with open(sys.argv[1], "rb+") as f: f.seek(OFFSET, 0) f.write(data)