From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CBFE1211D38FA for ; Mon, 4 Mar 2019 18:29:31 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2019 18:29:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,442,1544515200"; d="scan'208";a="148611180" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 04 Mar 2019 18:29:30 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 4 Mar 2019 18:29:30 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 4 Mar 2019 18:29:30 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.74]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.134]) with mapi id 14.03.0415.000; Tue, 5 Mar 2019 10:29:28 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "Fan, ZhijuX" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH V2] BaseTools:Run packagedoc_cli.py to generate doc failed Thread-Index: AQHU0u8SaFNdzETfeUOKyJSMURyybaX8UHgA Date: Tue, 5 Mar 2019 02:29:28 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3FB0DD@SHSMSX104.ccr.corp.intel.com> References: <08650203BA1BD64D8AD9B6D5D74A85D1600A7E93@SHSMSX101.ccr.corp.intel.com> <08650203BA1BD64D8AD9B6D5D74A85D1600A82B1@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D1600A82B1@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWFhMmE1ZTYtMGI1Yi00NmIxLWFiZWUtYmFmMTVmNDRmMmU4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMlwvSlptem1pZTBhcTdNR0lnOGt1RmNzZGpyWk9uZllhcHkyeGlnNUZTTTJINkM2QmhHUm1OUzZUbElpQVFyVmsifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH V2] BaseTools:Run packagedoc_cli.py to generate doc failed X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 02:29:32 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This is a bug. I agree to fix it for Q1 stable tag.=20 > -----Original Message----- > From: Feng, Bob C > Sent: Monday, March 4, 2019 5:02 PM > To: Gao, Liming ; Fan, ZhijuX ; edk2-devel@lists.01.org > Cc: Feng, Bob C > Subject: RE: [edk2] [PATCH V2] BaseTools:Run packagedoc_cli.py to generat= e doc failed >=20 > Hi, >=20 > This patch is to fix the a regression issue introduced by python3 patch s= et. I'd like to push this patch for Q1 stable tag. > Would you approve it? >=20 > Thanks, > Bob >=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fe= ng, Bob C > Sent: Monday, March 4, 2019 3:30 PM > To: Fan, ZhijuX ; edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: Re: [edk2] [PATCH V2] BaseTools:Run packagedoc_cli.py to generat= e doc failed >=20 > Reviewed-by: Bob Feng >=20 >=20 > -----Original Message----- > From: Fan, ZhijuX > Sent: Friday, March 1, 2019 10:52 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming ; Feng, Bob C > Subject: [edk2][PATCH V2] BaseTools:Run packagedoc_cli.py to generate doc= failed >=20 > The reason for this problem is that the file was opened incorrectly. >=20 > Cc: Bob Feng > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Zhiju.Fan > --- > .../plugins/EdkPlugins/edk2/model/doxygengen.py | 7 += +++--- > 1 file changed, 4 insertions(+), 3 deletions(-) >=20 > diff --git a/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/ed= k2/model/doxygengen.py > b/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/do= xygengen.py > index e31df262bc..73349e2f48 100644 > --- a/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/mode= l/doxygengen.py > +++ b/BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/mode= l/doxygengen.py > @@ -376,9 +376,10 @@ class PackageDocumentAction(DoxygenAction): > return >=20 > try: > - f =3D open(path, 'r') > - lines =3D f.readlines() > - f.close() > + with open(path, 'r') as f: > + lines =3D f.readlines() > + except UnicodeDecodeError: > + return > except IOError: > ErrorMsg('Fail to open file %s' % path) > return > -- > 2.14.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel