BaseTools: refactor and remove un-needed use of .keys() on dictionaries
sometimes just delete it. sometimes the loop needed .values() instead 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
55c84777ee
commit
9eb87141ec
@ -838,7 +838,7 @@ class PcdReport(object):
|
||||
for PcdItem in GlobalData.gConditionalPcds:
|
||||
if '.' in PcdItem:
|
||||
(TokenSpaceGuidCName, TokenCName) = PcdItem.split('.')
|
||||
if (TokenCName, TokenSpaceGuidCName) in Pa.Platform.Pcds.keys():
|
||||
if (TokenCName, TokenSpaceGuidCName) in Pa.Platform.Pcds:
|
||||
Pcd = Pa.Platform.Pcds[(TokenCName, TokenSpaceGuidCName)]
|
||||
PcdList = self.ConditionalPcds.setdefault(Pcd.TokenSpaceGuidCName, {}).setdefault(Pcd.Type, [])
|
||||
if Pcd not in PcdList:
|
||||
@ -1043,7 +1043,7 @@ class PcdReport(object):
|
||||
DscMatch = (DscDefaultValue.strip() == PcdValue.strip())
|
||||
|
||||
IsStructure = False
|
||||
if GlobalData.gStructurePcd and (self.Arch in GlobalData.gStructurePcd.keys()) and ((Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in GlobalData.gStructurePcd[self.Arch]):
|
||||
if GlobalData.gStructurePcd and (self.Arch in GlobalData.gStructurePcd) and ((Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in GlobalData.gStructurePcd[self.Arch]):
|
||||
IsStructure = True
|
||||
if TypeName in ('DYNVPD', 'DEXVPD'):
|
||||
SkuInfoList = Pcd.SkuInfoList
|
||||
|
Reference in New Issue
Block a user