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>
This commit is contained in:
committed by
Yonghong Zhu
parent
05a32984ab
commit
4231a8193e
@ -133,7 +133,7 @@ class InfDefinSectionParser(InfParserSectionRoot):
|
||||
if LineContent.find(DT.TAB_COMMENT_SPLIT) > -1:
|
||||
TailComments = LineContent[LineContent.find(DT.TAB_COMMENT_SPLIT):]
|
||||
LineContent = LineContent[:LineContent.find(DT.TAB_COMMENT_SPLIT)]
|
||||
if LineComment == None:
|
||||
if LineComment is None:
|
||||
LineComment = InfLineCommentObject()
|
||||
LineComment.SetTailComments(TailComments)
|
||||
|
||||
@ -144,7 +144,7 @@ class InfDefinSectionParser(InfParserSectionRoot):
|
||||
FileName,
|
||||
DT.MODEL_META_DATA_HEADER,
|
||||
self.FileLocalMacros)
|
||||
if Name != None:
|
||||
if Name is not None:
|
||||
self.FileLocalMacros[Name] = Value
|
||||
continue
|
||||
|
||||
@ -173,7 +173,7 @@ class InfDefinSectionParser(InfParserSectionRoot):
|
||||
Name, Value = _ValueList[0], _ValueList[1]
|
||||
|
||||
InfDefMemberObj = InfDefMember(Name, Value)
|
||||
if (LineComment != None):
|
||||
if (LineComment is not None):
|
||||
InfDefMemberObj.Comments.SetHeaderComments(LineComment.GetHeaderComments())
|
||||
InfDefMemberObj.Comments.SetTailComments(LineComment.GetTailComments())
|
||||
|
||||
|
Reference in New Issue
Block a user