BaseTools: remove redundant if comparison
inherently python will check string and list for None and having data if <x> in [None, ''] and similar are superflous. 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
1beb268a68
commit
c93356ada9
@ -1116,7 +1116,7 @@ class InfBuildData(ModuleBuildClassObject):
|
||||
Pcd.DatumType = PcdInPackage.DatumType
|
||||
Pcd.MaxDatumSize = PcdInPackage.MaxDatumSize
|
||||
Pcd.InfDefaultValue = Pcd.DefaultValue
|
||||
if Pcd.DefaultValue in [None, '']:
|
||||
if not Pcd.DefaultValue:
|
||||
Pcd.DefaultValue = PcdInPackage.DefaultValue
|
||||
else:
|
||||
try:
|
||||
|
Reference in New Issue
Block a user