From 8f6a4e3dcc006065b366956f156f3fad83373728 Mon Sep 17 00:00:00 2001 From: "Chen, Gang G" Date: Sun, 7 Apr 2024 16:52:35 +0800 Subject: [PATCH] Support python3 for gpt_ini2bin.py Signed-off-by: Chen, Gang G --- gpt_bin/gpt_ini2bin.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gpt_bin/gpt_ini2bin.py b/gpt_bin/gpt_ini2bin.py index 21530563..0870388d 100755 --- a/gpt_bin/gpt_ini2bin.py +++ b/gpt_bin/gpt_ini2bin.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import uuid import struct @@ -27,7 +27,7 @@ def zero_pad(s, size): if (len(s) > size): print('error', len(s)) - s += '\0' * (size - len(s)) + s += b'\0' * (size - len(s)) return s def copy_section(cfg, a, b): @@ -155,22 +155,22 @@ def main(): npart = len(part) out = sys.stdout - out.write(struct.pack('