From b5237cb0c81223080b777ecefec650940dbdb7bd Mon Sep 17 00:00:00 2001 From: celadon Date: Wed, 6 Sep 2023 03:56:50 +0000 Subject: [PATCH] changes in device-intel-common Signed-off-by: celadon --- gpt_bin/gpt_ini2bin.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gpt_bin/gpt_ini2bin.py b/gpt_bin/gpt_ini2bin.py index 21530563..680a6143 100755 --- a/gpt_bin/gpt_ini2bin.py +++ b/gpt_bin/gpt_ini2bin.py @@ -27,7 +27,7 @@ def zero_pad(s, size): if (len(s) > size): print('error', len(s)) - s += '\0' * (size - len(s)) + s += b'\x00\x00' * (size - len(s)) return s def copy_section(cfg, a, b): @@ -139,9 +139,9 @@ def main(): gpt_in = sys.argv[1] if sys.version_info < (3, 0, 1): - cfg = ConfigParser.SafeConfigParser() + cfg = ConfigParser.ConfigParser() else: - cfg = configparser.SafeConfigParser(strict=False) + cfg = configparser.ConfigParser(strict=False) cfg.read(gpt_in) @@ -155,22 +155,22 @@ def main(): npart = len(part) out = sys.stdout - out.write(struct.pack('