diff options
author | Philippe Mathieu-Daude <philmd@redhat.com> | 2019-12-05 19:19:41 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2019-12-06 03:07:37 +0000 |
commit | 490a62beb7e1d084f14a93b895f9c89a49e4a51d (patch) | |
tree | 23901c473a34ced3cd7fa6df87ee509533738286 /BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | |
parent | e8b9296c67dffaddd26dce06d8daaca6206fa620 (diff) | |
download | edk2-490a62beb7e1d084f14a93b895f9c89a49e4a51d.tar.gz edk2-490a62beb7e1d084f14a93b895f9c89a49e4a51d.tar.bz2 edk2-490a62beb7e1d084f14a93b895f9c89a49e4a51d.zip |
BaseTools: Avoid "is" with a literal Python 3.8 warnings
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2304
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.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py index fde48b4b27..ec0c25bd14 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
|