From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web09.7313.1575541915719147561 for ; Thu, 05 Dec 2019 02:31:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E7Q3cc1Q; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575541914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EAPbivYizaLFsVAc0h1h33VlVaWINV+dcAaWNz2zWJM=; b=E7Q3cc1Qf3Fom4VTZiZQ/M4MWIxuezZWNFbc8/MnFL04SG2Y37OmFVYWziVetaZXRGi1rV UpW7S4riqZGPCEBDlTge9ttNNIWqltbuz0wXsj3lKFQ/oMVQedMRmfMIUZYn0YlSHQc4Wz 5A8mQxn0eosG0QAk5Z7IeMMiKM8IRjM= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-lB28w44_MnyhIp9XiznEIA-1; Thu, 05 Dec 2019 05:31:50 -0500 Received: by mail-wr1-f69.google.com with SMTP id v17so1327169wrm.17 for ; Thu, 05 Dec 2019 02:31:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EAPbivYizaLFsVAc0h1h33VlVaWINV+dcAaWNz2zWJM=; b=qEIhTgRdMAyBFEkAks8Dnf+fMtq9Nue+gWaInQI0l+8pnrrPM5NCT1kesCM40aD6Ep SWzUKHa4xErEnKRePM3Stg/vr2DDkLTlFVoDGcW6LcjWY30RmStnCQmpnGu7p5C+6CZk p3DVFGZYXyDJsrkaNonNvfzfQJjA9Lv8fZGkP0WB/kgk+GiSzhdvDcA/jyTkdPi1C/fv yGeGcDvv4BI++d/VDE5MUGNgfzqVm2w4HYUZIKv0lXRAJLhHyf8bzA4Ax8/3LQSmW9nC kpZbnYJouyJYww/qy7N1P5KjsOL9qfiCAxB/FSORZjN/dAz4JR/4napAiKM7yq0YrVum 9paA== X-Gm-Message-State: APjAAAVWKH+45TTgVCnGo3I1KFtUiZ1C/oOFlND5AFTtATg06Tw/bge4 Q/FNLmlxlAY/BnMl0eVrtnG4wX91BxHuUdcVB4K3b2bcbH5YjQU/AGWXs4HwNuuZREJ1H1n+4wb 36pL8krkY8eVIrA== X-Received: by 2002:a1c:46:: with SMTP id 67mr4444340wma.51.1575541909618; Thu, 05 Dec 2019 02:31:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxD3uTkpO6RoM7N9T8v1XcMKh0PWLz6E4GFy6caC8m0OZN4exI+eM7LKPMimFYc6LKtX+cxlg== X-Received: by 2002:a1c:46:: with SMTP id 67mr4444310wma.51.1575541909387; Thu, 05 Dec 2019 02:31:49 -0800 (PST) Return-Path: Received: from [192.168.1.35] (182.red-88-21-103.staticip.rima-tde.net. [88.21.103.182]) by smtp.gmail.com with ESMTPSA id n8sm11699881wrx.42.2019.12.05.02.31.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Dec 2019 02:31:48 -0800 (PST) Subject: Re: [edk2-devel] [PATCH 1/2] BaseTools: Avoid "is" with a literal Python 3.8 warnings To: "Feng, Bob C" , "devel@edk2.groups.io" Cc: Sean Brogan , "Fan, ZhijuX" , Bret Barkelew , "Gao, Liming" , "Kinney, Michael D" References: <20191202173309.10411-1-philmd@redhat.com> <20191202173309.10411-2-philmd@redhat.com> <15DD7135640BB2F8.32327@groups.io> <08650203BA1BD64D8AD9B6D5D74A85D16157BF33@SHSMSX104.ccr.corp.intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <85c09dc3-11fe-981f-f1a7-a7c6da76ed82@redhat.com> Date: Thu, 5 Dec 2019 11:31:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D16157BF33@SHSMSX104.ccr.corp.intel.com> X-MC-Unique: lB28w44_MnyhIp9XiznEIA-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 12/5/19 11:09 AM, Feng, Bob C wrote: > Hi Philippe, > > Please add BZ link to the commit message and fix the following issue which is reported from PatchCheck.py > > The commit message format is not valid: > * Line 5 of commit message is too long. > * Line 6 of commit message is too long. Oops sorry, OK. What BZ should I use? Should I create a new one? > https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-Format > The code passed all checks. > > After fixed, Reviewed-by: Bob Feng > > Thanks, > Bob > > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Bob Feng > Sent: Thursday, December 5, 2019 5:59 PM > To: Philippe Mathieu-Daude ; devel@edk2.groups.io > Cc: Sean Brogan ; Fan, ZhijuX ; Bret Barkelew ; Gao, Liming ; Kinney, Michael D > Subject: Re: [edk2-devel] [PATCH 1/2] BaseTools: Avoid "is" with a literal Python 3.8 warnings > > Reviewed-by: Bob Feng > > -----Original Message----- > From: Philippe Mathieu-Daude [mailto:philmd@redhat.com] > Sent: Tuesday, December 3, 2019 1:33 AM > To: devel@edk2.groups.io > Cc: Sean Brogan ; Fan, ZhijuX ; Feng, Bob C ; Bret Barkelew ; Gao, Liming ; Kinney, Michael D ; Philippe Mathieu-Daude > Subject: [PATCH 1/2] BaseTools: Avoid "is" with a literal Python 3.8 warnings > > The following statement produces a SyntaxWarning with Python 3.8: > > if str(FdRegion.RegionType) is 'FILE' and self.Platform.VpdToolGuid in str(FdRegion.RegionDataList): > BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py:168: SyntaxWarning: "is" with a literal. Did you mean "=="? > > Change the 'is' operator by the conventional '==' comparator. > > Signed-off-by: Philippe Mathieu-Daude > --- > BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > index fde48b4b2788..ec0c25bd1487 100644 > --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > @@ -165,7 +165,7 @@ class WorkspaceAutoGen(AutoGen): > if Fdf.CurrentFdName and Fdf.CurrentFdName in Fdf.Profile.FdDict: > FdDict = Fdf.Profile.FdDict[Fdf.CurrentFdName] > for FdRegion in FdDict.RegionList: > - if str(FdRegion.RegionType) is 'FILE' and self.Platform.VpdToolGuid in str(FdRegion.RegionDataList): > + if str(FdRegion.RegionType) == 'FILE' and self.Platform.VpdToolGuid in str(FdRegion.RegionDataList): > if int(FdRegion.Offset) % 8 != 0: > EdkLogger.error("build", FORMAT_INVALID, 'The VPD Base Address %s must be 8-byte aligned.' % (FdRegion.Offset)) > FdfProfile = Fdf.Profile >