BaseTools: simplify testing for existance and containing data
and remove a duplicate "if" block from 6 lines up. 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
ac55e47818
commit
6be947438f
@ -2352,17 +2352,15 @@ class PlatformAutoGen(AutoGen):
|
|||||||
ToPcd.Type, Module, FromPcd.Type),
|
ToPcd.Type, Module, FromPcd.Type),
|
||||||
File=self.MetaFile)
|
File=self.MetaFile)
|
||||||
|
|
||||||
if FromPcd.MaxDatumSize not in [None, '']:
|
if FromPcd.MaxDatumSize:
|
||||||
ToPcd.MaxDatumSize = FromPcd.MaxDatumSize
|
ToPcd.MaxDatumSize = FromPcd.MaxDatumSize
|
||||||
if FromPcd.DefaultValue not in [None, '']:
|
if FromPcd.DefaultValue:
|
||||||
ToPcd.DefaultValue = FromPcd.DefaultValue
|
ToPcd.DefaultValue = FromPcd.DefaultValue
|
||||||
if FromPcd.TokenValue not in [None, '']:
|
if FromPcd.TokenValue:
|
||||||
ToPcd.TokenValue = FromPcd.TokenValue
|
ToPcd.TokenValue = FromPcd.TokenValue
|
||||||
if FromPcd.MaxDatumSize not in [None, '']:
|
if FromPcd.DatumType:
|
||||||
ToPcd.MaxDatumSize = FromPcd.MaxDatumSize
|
|
||||||
if FromPcd.DatumType not in [None, '']:
|
|
||||||
ToPcd.DatumType = FromPcd.DatumType
|
ToPcd.DatumType = FromPcd.DatumType
|
||||||
if FromPcd.SkuInfoList not in [None, '', []]:
|
if FromPcd.SkuInfoList:
|
||||||
ToPcd.SkuInfoList = FromPcd.SkuInfoList
|
ToPcd.SkuInfoList = FromPcd.SkuInfoList
|
||||||
# Add Flexible PCD format parse
|
# Add Flexible PCD format parse
|
||||||
if ToPcd.DefaultValue:
|
if ToPcd.DefaultValue:
|
||||||
@ -3933,11 +3931,11 @@ class ModuleAutoGen(AutoGen):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Skip the following code for modules with no source files
|
# Skip the following code for modules with no source files
|
||||||
if self.SourceFileList is None or self.SourceFileList == []:
|
if not self.SourceFileList:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Skip the following code for modules without any binary files
|
# Skip the following code for modules without any binary files
|
||||||
if self.BinaryFileList <> None and self.BinaryFileList <> []:
|
if not self.BinaryFileList:
|
||||||
return
|
return
|
||||||
|
|
||||||
### TODO: How to handles mixed source and binary modules
|
### TODO: How to handles mixed source and binary modules
|
||||||
|
Reference in New Issue
Block a user