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
@ -52,16 +52,16 @@ class UiSection (UiSectionClassObject):
|
||||
#
|
||||
# Prepare the parameter of GenSection
|
||||
#
|
||||
if FfsInf != None:
|
||||
if FfsInf is not None:
|
||||
self.Alignment = FfsInf.__ExtendMacro__(self.Alignment)
|
||||
self.StringData = FfsInf.__ExtendMacro__(self.StringData)
|
||||
self.FileName = FfsInf.__ExtendMacro__(self.FileName)
|
||||
|
||||
OutputFile = os.path.join(OutputPath, ModuleName + 'SEC' + SecNum + Ffs.SectionSuffix.get('UI'))
|
||||
|
||||
if self.StringData != None :
|
||||
if self.StringData is not None :
|
||||
NameString = self.StringData
|
||||
elif self.FileName != None:
|
||||
elif self.FileName is not None:
|
||||
FileNameStr = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)
|
||||
FileNameStr = GenFdsGlobalVariable.MacroExtend(FileNameStr, Dict)
|
||||
FileObj = open(FileNameStr, 'r')
|
||||
|
Reference in New Issue
Block a user