summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-04-13 08:02:10 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-17 20:49:32 +0800
commit128d435f5e572733ab2649c4494f5d4f786b6f6b (patch)
tree67c27162da6af724a8d93da66946971c3cb1c33b /BaseTools/Source/Python/AutoGen
parent72fbe88d7290cfc4196658898ea8c5e28d539502 (diff)
downloadedk2-128d435f5e572733ab2649c4494f5d4f786b6f6b.tar.gz
edk2-128d435f5e572733ab2649c4494f5d4f786b6f6b.tar.bz2
edk2-128d435f5e572733ab2649c4494f5d4f786b6f6b.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py2
-rw-r--r--BaseTools/Source/Python/AutoGen/GenC.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index a4e36d1a2f..69c1ef4eba 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -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:
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index c11bbc5716..6706629722 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -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",