From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 8D3A121163248 for ; Wed, 17 Oct 2018 18:04:55 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2018 18:04:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,393,1534834800"; d="scan'208";a="100379948" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 17 Oct 2018 18:04:55 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 17 Oct 2018 18:04:54 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 17 Oct 2018 18:04:42 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.48]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.245]) with mapi id 14.03.0319.002; Thu, 18 Oct 2018 09:04:12 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fix bug caused by 03c36c36a3 Thread-Index: AQHUZhNqPCuLCsUBSUKp93erS2DxaaUkMMyw Date: Thu, 18 Oct 2018 01:04:11 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E33CF41@SHSMSX104.ccr.corp.intel.com> References: <1539778652-5488-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1539778652-5488-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 bug caused by 03c36c36a3 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: Thu, 18 Oct 2018 01:04:55 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >Yonghong Zhu >Sent: Wednesday, October 17, 2018 8:18 PM >To: edk2-devel@lists.01.org >Subject: [edk2] [Patch] BaseTools: Fix bug caused by 03c36c36a3 > >In the expression for unicode string and general string compare, it >should check whether it startswith "L'" or 'L"', but not "L". > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/Common/Expression.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/BaseTools/Source/Python/Common/Expression.py >b/BaseTools/Source/Python/Common/Expression.py >index e398f7a..05459b9 100644 >--- a/BaseTools/Source/Python/Common/Expression.py >+++ b/BaseTools/Source/Python/Common/Expression.py >@@ -295,12 +295,12 @@ class ValueExpression(BaseExpression): > # bitwise and logical operation between number and bo= olean is >allowed > pass > else: > raise BadExpression(ERR_EXPR_TYPE) > if isinstance(Oprand1, type('')) and isinstance(Oprand2, type= ('')): >- if ((Oprand1.startswith('L"') or Oprand1.startswith('L'))= and (not >Oprand2.startswith('L"')) and (not Oprand2.startswith("L'"))) or \ >- (((not Oprand1.startswith('L"')) and (not >Oprand1.startswith("L'"))) and (Oprand2.startswith('L"') or >Oprand2.startswith('L'))): >+ if ((Oprand1.startswith('L"') or Oprand1.startswith("L'")= ) and (not >Oprand2.startswith('L"')) and (not Oprand2.startswith("L'"))) or \ >+ (((not Oprand1.startswith('L"')) and (not >Oprand1.startswith("L'"))) and (Oprand2.startswith('L"') or >Oprand2.startswith("L'"))): > raise BadExpression(ERR_STRING_CMP % (Oprand1, Operat= or, >Oprand2)) > if 'in' in Operator and isinstance(Oprand2, type('')): > Oprand2 =3D Oprand2.split() > EvalStr =3D 'Oprand1 ' + Operator + ' Oprand2' > >-- >2.6.1.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel