BaseTools: fix None comparisons
when comparing a list/string against None and empty, just compare the object. when comparing against None, dont use !=, ==, <> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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
72fbe88d72
commit
128d435f5e
@ -337,11 +337,10 @@ class FV (FvClassObject):
|
||||
#
|
||||
# Generate FV extension header file
|
||||
#
|
||||
if self.FvNameGuid is None or self.FvNameGuid == '':
|
||||
if not self.FvNameGuid:
|
||||
if len(self.FvExtEntryType) > 0 or self.UsedSizeEnable:
|
||||
GenFdsGlobalVariable.ErrorLogger("FV Extension Header Entries declared for %s with no FvNameGuid declaration." % (self.UiFvName))
|
||||
|
||||
if self.FvNameGuid <> None and self.FvNameGuid <> '':
|
||||
else:
|
||||
TotalSize = 16 + 4
|
||||
Buffer = ''
|
||||
if self.UsedSizeEnable:
|
||||
|
Reference in New Issue
Block a user