From nobody Mon Feb 9 14:35:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+86422+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+86422+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1644260574; cv=none; d=zohomail.com; s=zohoarc; b=AB+xMtaiXZZWQ2bsgGmYKPODkMVvV5ZH8dyJ5oijomsHI5MvDyr3JZVRHjbvOMGSy0kutdPD8Q52KuI6pVHWp/PO0vHbZsYTIYS1stCFtUeqoY/mC1yfST8A4ZiuSM9Jy1Fr/CET7XeyBPnX80Y2M3ar8n0wzXtnxDqUGcgiDck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644260574; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=vHxkftDUuqt0tle826TTgowX2yDFWRsYQnKjJFDzBvs=; b=ZM5QJj4Q51Pz9TFRI9aob8ss7OlSbn3FW4PDxvUWi0YBKtO+vqlL2xnN0Q6xWmqkgORjZPPkDhIEjgygIsZLaJZCosfTRoOUP5noO1vpj5mEjEPPaW2dju0frM9cnABNTs90ZjHxE2d1Jur1wOLf4QoTF904aI3dsKfadR/oyJU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+86422+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1644260574387344.5032053899604; Mon, 7 Feb 2022 11:02:54 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id KoR4YY1788612xkAXAC3qdD0; Mon, 07 Feb 2022 11:02:54 -0800 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web09.428.1644260571881110988 for ; Mon, 07 Feb 2022 11:02:52 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10250"; a="309532835" X-IronPort-AV: E=Sophos;i="5.88,350,1635231600"; d="scan'208";a="309532835" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 11:02:50 -0800 X-IronPort-AV: E=Sophos;i="5.88,350,1635231600"; d="scan'208";a="567583937" X-Received: from iworam-desk.amr.corp.intel.com ([10.7.150.79]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 11:02:50 -0800 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel][edk2-platforms][PATCH V1 1/8] MinPlatformPkg/AmlGenOffset: Update for python 3 Date: Mon, 7 Feb 2022 11:02:38 -0800 Message-Id: <661e68fa9ad9455333d989afb3171824d99f598e.1644259969.git.isaac.w.oram@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,isaac.w.oram@intel.com X-Gm-Message-State: MQitVqphPUtbdxixYrNk81Rix1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1644260574; bh=xe6JcLsQiVUh35Zpap/irNedKYnavLbSh6p3xHv3PM4=; h=Cc:Date:From:Reply-To:Subject:To; b=MgQm3xZZscX8LVNS742U8Q95H2CsZTnsfNitu05PINnNMn1p47av+VnkteSlJ/BicpS CekzCdGOtzjjf3FENxBeevWWWdPVL7M60St+I3Vm2Sf7EksSsBpDoy3HqapGzqf/Yp+Wf SUwMocGv6ZTg7deZFrbBvC29+V1uZQVdE/0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1644260577010100002 Content-Type: text/plain; charset="utf-8" Update for library changes. Remove version. Changed to not open files as bytes. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Isaac Oram Reviewed-by: Nate DeSimone --- Platform/Intel/MinPlatformPkg/Tools/AmlGenOffset/AmlGenOffset.py | 13 ++++= ++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Tools/AmlGenOffset/AmlGenOffset.= py b/Platform/Intel/MinPlatformPkg/Tools/AmlGenOffset/AmlGenOffset.py index e13ca06471..4799eee1a9 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/AmlGenOffset/AmlGenOffset.py +++ b/Platform/Intel/MinPlatformPkg/Tools/AmlGenOffset/AmlGenOffset.py @@ -32,16 +32,16 @@ if __name__ =3D=3D '__main__': # # Create command line argument parser object # - parser =3D argparse.ArgumentParser(prog=3D__prog__, version=3D__version_= _, usage=3D__usage__, description=3D__copyright__, conflict_handler=3D'reso= lve') + parser =3D argparse.ArgumentParser(prog=3D__prog__, usage=3D__usage__, d= escription=3D__copyright__, conflict_handler=3D'resolve') group =3D parser.add_mutually_exclusive_group(required=3DTrue) group.add_argument("-e", action=3D"store_true", dest=3D'Encode', help=3D= 'encode file') group.add_argument("-d", action=3D"store_true", dest=3D'Decode', help=3D= 'decode file') - parser.add_argument("-o", "--output", dest=3D'OutputFile', type=3Dstr, m= etavar=3D'filename', help=3D"specify the output filename", required=3DTrue) + parser.add_argument("-o", "--output", dest=3D'OutputFileName', type=3Dst= r, metavar=3D'filename', help=3D"specify the output filename", required=3DT= rue) parser.add_argument("-v", "--verbose", dest=3D'Verbose', action=3D"store= _true", help=3D"increase output messages") parser.add_argument("-q", "--quiet", dest=3D'Quiet', action=3D"store_tru= e", help=3D"reduce output messages") parser.add_argument("--debug", dest=3D'Debug', type=3Dint, metavar=3D'[0= -9]', choices=3Drange(0,10), default=3D0, help=3D"set debug level") parser.add_argument("--aml_filter", dest=3D'AmlFilterStr', type=3Dstr, h= elp=3D"specify the AML filter.") - parser.add_argument(metavar=3D"input_file", dest=3D'InputFile', type=3Da= rgparse.FileType('rb'), help=3D"specify the input filename") + parser.add_argument(metavar=3D"input_file", dest=3D'InputFile', type=3Da= rgparse.FileType('r'), help=3D"specify the input filename") =20 # # Parse command line arguments @@ -49,11 +49,11 @@ if __name__ =3D=3D '__main__': args =3D parser.parse_args() =20 if args.Encode: - print 'Unsupported' + print('Unsupported') =20 if args.Decode: - args.OutputFileName =3D args.OutputFile - args.OutputFile =3D open(args.OutputFileName, 'wb') + args.OutputFileName =3D os.path.normpath(args.OutputFileName) + args.OutputFile =3D open(args.OutputFileName, 'w') =20 AmlFilter =3D args.AmlFilterStr filter_pattern =3D '|'.join(AmlFilter.split(' ')) @@ -69,4 +69,3 @@ if __name__ =3D=3D '__main__': if match_obj is not None: args.OutputFile.write(line) args.OutputFile.close() - --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#86422): https://edk2.groups.io/g/devel/message/86422 Mute This Topic: https://groups.io/mt/88979435/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-