From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Feng, Bob C" <bob.c.feng@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Sean Brogan <sean.brogan@microsoft.com>,
"Fan, ZhijuX" <zhijux.fan@intel.com>,
Bret Barkelew <Bret.Barkelew@microsoft.com>,
"Gao, Liming" <liming.gao@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/2] BaseTools: Avoid "is" with a literal Python 3.8 warnings
Date: Thu, 5 Dec 2019 11:31:47 +0100 [thread overview]
Message-ID: <85c09dc3-11fe-981f-f1a7-a7c6da76ed82@redhat.com> (raw)
In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D16157BF33@SHSMSX104.ccr.corp.intel.com>
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 <bob.c.feng@intel.com>
>
> 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 <philmd@redhat.com>; devel@edk2.groups.io
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Fan, ZhijuX <zhijux.fan@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> Subject: Re: [edk2-devel] [PATCH 1/2] BaseTools: Avoid "is" with a literal Python 3.8 warnings
>
> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
>
> -----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 <sean.brogan@microsoft.com>; Fan, ZhijuX <zhijux.fan@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Philippe Mathieu-Daude <philmd@redhat.com>
> 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 <philmd@redhat.com>
> ---
> 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
>
next prev parent reply other threads:[~2019-12-05 10:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 17:33 [PATCH 0/2] Fix two Python 3.8 warnings Philippe Mathieu-Daudé
2019-12-02 17:33 ` [PATCH 1/2] BaseTools: Avoid "is" with a literal " Philippe Mathieu-Daudé
2019-12-05 9:58 ` Bob Feng
[not found] ` <15DD7135640BB2F8.32327@groups.io>
2019-12-05 10:09 ` [edk2-devel] " Bob Feng
2019-12-05 10:31 ` Philippe Mathieu-Daudé [this message]
2019-12-05 10:52 ` Bob Feng
2019-12-02 17:33 ` [PATCH 2/2] .pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins Philippe Mathieu-Daudé
2019-12-05 9:59 ` [edk2-devel] " Bob Feng
[not found] ` <15DD71437DB6197D.24783@groups.io>
2019-12-05 10:07 ` Bob Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85c09dc3-11fe-981f-f1a7-a7c6da76ed82@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox