From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"zhijux.fan@intel.com" <zhijux.fan@intel.com>
Cc: "Gao, Liming" <liming.gao@intel.com>,
"Feng, Bob C" <bob.c.feng@intel.com>
Subject: Re: [edk2-devel] [PATCH] BaseTools:Change judgment symbol "is" to "==" for python3.8
Date: Fri, 29 Nov 2019 10:44:04 +0100 [thread overview]
Message-ID: <85c42c66-3cb5-1247-f5b6-33b709a5078e@redhat.com> (raw)
In-Reply-To: <FAD0D7E0AE0FA54D987F6E72435CAFD50AFE2C79@SHSMSX101.ccr.corp.intel.com>
On 11/29/19 7:08 AM, Fan, ZhijuX via Groups.Io wrote:
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2304
>
> build.py and BuildReport.py warning using python 3.8
> SyntaxWarning: "is" with a literal. Did you mean "=="?
Maybe:
BuildReport.py warning using python 3.8:
SyntaxWarning: "is" with a literal. Did you mean "=="?
>
> For comparison of two strings use "==" instead of "is"
> The patch is going to fixed this issue.
Maybe:
Fix this comparison of two strings warning by using "==" instead of "is".
>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
> ---
> BaseTools/Source/Python/build/BuildReport.py | 2 +-
> BaseTools/Source/Python/build/build.py | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
> index 880459d367..8efa869162 100644
> --- a/BaseTools/Source/Python/build/BuildReport.py
> +++ b/BaseTools/Source/Python/build/BuildReport.py
> @@ -2042,7 +2042,7 @@ class FdReport(object):
> self.VPDBaseAddress = 0
> self.VPDSize = 0
> for index, FdRegion in enumerate(Fd.RegionList):
> - if str(FdRegion.RegionType) is 'FILE' and Wa.Platform.VpdToolGuid in str(FdRegion.RegionDataList):
> + if str(FdRegion.RegionType) == 'FILE' and Wa.Platform.VpdToolGuid in str(FdRegion.RegionDataList):
> self.VPDBaseAddress = self.FdRegionList[index].BaseAddress
> self.VPDSize = self.FdRegionList[index].Size
> break
> diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
> index 07f1f21b5d..4b31356a42 100755
> --- a/BaseTools/Source/Python/build/build.py
> +++ b/BaseTools/Source/Python/build/build.py
> @@ -2064,7 +2064,7 @@ class Build():
> 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):
This already has been fixed in commit 49fb9f7e06b92.
> if int(FdRegion.Offset) % 8 != 0:
> EdkLogger.error("build", FORMAT_INVALID, 'The VPD Base Address %s must be 8-byte aligned.' % (FdRegion.Offset))
> Wa.FdfProfile = Fdf.Profile
> --
> 2.14.1.windows.1
>
>
prev parent reply other threads:[~2019-11-29 9:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 6:08 [PATCH] BaseTools:Change judgment symbol "is" to "==" for python3.8 Fan, ZhijuX
2019-11-29 9:44 ` Philippe Mathieu-Daudé [this message]
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=85c42c66-3cb5-1247-f5b6-33b709a5078e@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