From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-40136.protonmail.ch (mail-40136.protonmail.ch [185.70.40.136]) by mx.groups.io with SMTP id smtpd.web10.2515.1608322521070720430 for ; Fri, 18 Dec 2020 12:15:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@senzilla.io header.s=protonmail2 header.b=psD3hT/r; spf=pass (domain: senzilla.io, ip: 185.70.40.136, mailfrom: hi@senzilla.io) Date: Fri, 18 Dec 2020 20:15:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=senzilla.io; s=protonmail2; t=1608322517; bh=F2d6Ke7C21R+FsYgNEclGFEUuLrjvNhA2dL+c9HrHgI=; h=Date:To:From:Cc:Reply-To:Subject:From; b=psD3hT/rt74VIsUdC5PiVjFRkQNX1TtbJez5SzWFKWJdzXkO3Q8zri9xEzmSXxH4i 3bRqXJOWZot9fVeyXeLp26KERPWfDklzCH3SMNBdHA9sF/LsUx4TkfQdC9wgHHzDKj cLwVGiN+QZUjKbGa4ngkL+hovwMR42CEGkTUnsrTy04r/V3UpCs+L2SopnT0mr/Yne xsk+tatWAaKGpwnyvayGYqvx2dD7xc8RnrIEF/xYJ/AJ1nvuR5q1Xd0WuEGiDc7II0 YxFcn/XFjKbAG37ArMbR+2iZMot8M+Qioakc3N2ugSjGVTyQoLamol4DkydbuX3yno LFiZ+f/qlhAiw== To: devel@edk2.groups.io From: "D. Olsson" Cc: Dick Olsson Reply-To: Dick Olsson Subject: [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9 Message-ID: <20201218201443.1001495-1-hi@senzilla.io> MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Python 3.9 removed the tostring() and fromstring() methods: https://docs.python.org/3/whatsnew/3.9.html#removed Signed-off-by: Dick Olsson --- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseT= ools/Source/Python/GenFds/GenFdsGlobalVariable.py index dc1727c466..124dc43199 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -463,12 +463,12 @@ class GenFdsGlobalVariable: GenFdsGlobalVariable.SecCmdList.append(' '.join(Cmd).s= trip()) else: SectionData =3D array('B', [0, 0, 0, 0]) - SectionData.fromstring(Ui.encode("utf_16_le")) + SectionData.frombytes(Ui.encode("utf_16_le")) SectionData.append(0) SectionData.append(0) Len =3D len(SectionData) GenFdsGlobalVariable.SectionHeader.pack_into(SectionData, = 0, Len & 0xff, (Len >> 8) & 0xff, (Len >> 16) & 0xff, 0x15) - SaveFileOnChange(Output, SectionData.tostring()) + SaveFileOnChange(Output, SectionData.tobytes()) =20 elif Ver: Cmd +=3D ("-n", Ver) --=20 2.25.1