diff options
author | Carsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben> | 2018-03-27 04:25:43 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-03-30 08:25:13 +0800 |
commit | 4231a8193ec0d52df7e0a101d96c51b1a2b7a996 (patch) | |
tree | 4fc8e46c9d51a4938e891e6b029781f1b66537ae /BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py | |
parent | 05a32984ab799a564e2eeb7dff128fe0992910d8 (diff) | |
download | edk2-4231a8193ec0d52df7e0a101d96c51b1a2b7a996.tar.gz edk2-4231a8193ec0d52df7e0a101d96c51b1a2b7a996.tar.bz2 edk2-4231a8193ec0d52df7e0a101d96c51b1a2b7a996.zip |
BaseTools: Remove equality operator with None
replace "== None" with "is None" and "!= None" with "is not None"
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py')
-rw-r--r-- | BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py index 7b07036f91..d2712a97f2 100644 --- a/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py +++ b/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py @@ -43,7 +43,7 @@ def ValidateArch(ArchItem, PcdTypeItem1, LineNo, SupArchDict, SupArchList): #
# Validate Arch
#
- if (ArchItem == '' or ArchItem == None):
+ if (ArchItem == '' or ArchItem is None):
ArchItem = 'COMMON'
if PcdTypeItem1.upper != DT.TAB_INF_FEATURE_PCD.upper():
@@ -82,7 +82,7 @@ def ParsePcdComment(CommentList, PcdTypeItem, PcdItemObj): if PcdTypeItem == 'FeaturePcd':
CommentItemUsage = DT.USAGE_ITEM_CONSUMES
- if CommentItemHelpText == None:
+ if CommentItemHelpText is None:
CommentItemHelpText = ''
if Count == 1:
@@ -96,7 +96,7 @@ def ParsePcdComment(CommentList, PcdTypeItem, PcdItemObj): else:
continue
- if CommentItemHelpText == None:
+ if CommentItemHelpText is None:
CommentItemHelpText = ''
if Count == len(CommentList) and CommentItemUsage == DT.ITEM_UNDEFINED:
CommentItemHelpText = DT.END_OF_LINE
@@ -326,7 +326,7 @@ class InfPcdObject(): #
# Validate PcdType
#
- if (PcdTypeItem1 == '' or PcdTypeItem1 == None):
+ if (PcdTypeItem1 == '' or PcdTypeItem1 is None):
return False
else:
if not IsValidPcdType(PcdTypeItem1):
@@ -346,7 +346,7 @@ class InfPcdObject(): CurrentLineOfPcdItem = PcdItem[2]
PcdItem = PcdItem[0]
- if CommentList != None and len(CommentList) != 0:
+ if CommentList is not None and len(CommentList) != 0:
PcdItemObj = ParsePcdComment(CommentList, PcdTypeItem, PcdItemObj)
else:
CommentItemIns = InfPcdItemCommentContent()
|