From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 6D23980369 for ; Wed, 8 Mar 2017 22:53:11 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2017 22:53:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,267,1486454400"; d="scan'208";a="1120333975" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 08 Mar 2017 22:53:04 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Mar 2017 22:53:03 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Mar 2017 22:53:03 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Thu, 9 Mar 2017 14:53:01 +0800 From: "Zhu, Yonghong" To: "Chen, Hesheng" , "edk2-devel@lists.01.org" Thread-Topic: [patch 2/2] BaseTools/UPT: Add a checkpoint for missing '"' Thread-Index: AQHSlwhOvCyvqmlev0yAYcjYSNaWrKGMFYHw Date: Thu, 9 Mar 2017 06:53:01 +0000 Message-ID: References: <1488866494-10988-1-git-send-email-hesheng.chen@intel.com> <1488866494-10988-2-git-send-email-hesheng.chen@intel.com> In-Reply-To: <1488866494-10988-2-git-send-email-hesheng.chen@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 2/2] BaseTools/UPT: Add a checkpoint for missing '"' X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2017 06:53:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -----Original Message----- From: Chen, Hesheng=20 Sent: Tuesday, March 07, 2017 2:02 PM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong Subject: [patch 2/2] BaseTools/UPT: Add a checkpoint for missing '"' Add a checkpoint for UNI file which is missing '"' at the end of a line. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: hesschen --- BaseTools/Source/Python/UPT/Library/UniClassObject.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/UPT/Library/UniClassObject.py b/BaseTo= ols/Source/Python/UPT/Library/UniClassObject.py index 27804cc..1fbbf2e 100644 --- a/BaseTools/Source/Python/UPT/Library/UniClassObject.py +++ b/BaseTools/Source/Python/UPT/Library/UniClassObject.py @@ -1,7 +1,7 @@ ## @file # Collect all defined strings in multiple uni files. # -# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2017, Intel Corporation. All rights=20 +reserved.
# # This program and the accompanying materials are licensed and made availa= ble # under the terms and conditions of the BSD License which accompanies = this @@ -558,7 +558,16 @@ class UniFileClassObject(object): Message=3D"Cannot find include file",= =20 ExtraData=3Dstr(IncList[0])) continue - =20 + + # + # Check if single line has correct '"' + # + if Line.startswith(u'#string') and Line.find(u'#language') > -= 1 and Line.find('"') > Line.find(u'#language'): + if not Line.endswith('"'): + EdkLogger.Error("Unicode File Parser", ToolError.FORMA= T_INVALID, + ExtraData=3D'''The line %s misses '"' = at the end of it in file %s''' + % (LineCount,=20 + File.Path)) + # # Between Name entry and Language entry can not contain line f= eed # -- 2.7.2.windows.1