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
@@ -1665,7 +1665,7 @@ class PlatformAutoGen(AutoGen):
|
||||
DscPcdEntry.TokenValue = DecPcdEntry.TokenValue
|
||||
DscPcdEntry.TokenSpaceGuidValue = eachDec.Guids[DecPcdEntry.TokenSpaceGuidCName]
|
||||
# Only fix the value while no value provided in DSC file.
|
||||
if (Sku.DefaultValue == "" or Sku.DefaultValue==None):
|
||||
if not Sku.DefaultValue:
|
||||
DscPcdEntry.SkuInfoList[DscPcdEntry.SkuInfoList.keys()[0]].DefaultValue = DecPcdEntry.DefaultValue
|
||||
|
||||
if DscPcdEntry not in self._DynamicPcdList:
|
||||
|
@@ -1540,7 +1540,7 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH):
|
||||
}
|
||||
|
||||
if Info.ModuleType in ['PEI_CORE', 'DXE_CORE', 'SMM_CORE', 'MM_CORE_STANDALONE']:
|
||||
if Info.SourceFileList <> None and Info.SourceFileList <> []:
|
||||
if Info.SourceFileList:
|
||||
if NumEntryPoints != 1:
|
||||
EdkLogger.error(
|
||||
"build",
|
||||
|
Reference in New Issue
Block a user