From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 3BD0021A00AC2 for ; Mon, 3 Jul 2017 19:10:37 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2017 19:12:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,306,1496127600"; d="scan'208";a="1167756166" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 03 Jul 2017 19:12:14 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 3 Jul 2017 19:12:14 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.197]) with mapi id 14.03.0319.002; Tue, 4 Jul 2017 10:12:12 +0800 From: "Zhu, Yonghong" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Feng, YunhuaX" , "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [edk2] [PATCH] BaseTools: Fix FDF file parse !include file issue Thread-Index: AQHS89kUBRT3HhNODk61Oi1mA+MXJKJC7gaw Date: Tue, 4 Jul 2017 02:12:11 +0000 Message-ID: References: <1499071648-24832-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1499071648-24832-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools: Fix FDF file parse !include file issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 02:10:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yong= hong Zhu Sent: Monday, July 03, 2017 4:47 PM To: edk2-devel@lists.01.org Cc: Feng, YunhuaX ; Gao, Liming Subject: [edk2] [PATCH] BaseTools: Fix FDF file parse !include file issue From: Yunhua Feng when FDF file use "!include" format to include the other file, and the end = line of the file not end with '\n', the include file parse error. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/GenFds/FdfParser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index a1825baac7..028ba33eb6 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -167,6 +167,10 @@ class IncludeFileProfile : fsock =3D open(FileName, "rb", 0) try: self.FileLinesList =3D fsock.readlines() + for index, line in enumerate(self.FileLinesList): + if not line.endswith('\n'): + self.FileLinesList[index] +=3D '\n' + finally: fsock.close() =20 -- 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel