mirror of https://github.com/acidanthera/audk.git
BaseTools: dont make temporary dict
just make the key list directly 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:
parent
95cc496216
commit
175a4b5db3
|
@ -631,7 +631,7 @@ def GuidValue(CName, PackageList, Inffile = None):
|
||||||
GuidKeys = P.Guids.keys()
|
GuidKeys = P.Guids.keys()
|
||||||
if Inffile and P._PrivateGuids:
|
if Inffile and P._PrivateGuids:
|
||||||
if not Inffile.startswith(P.MetaFile.Dir):
|
if not Inffile.startswith(P.MetaFile.Dir):
|
||||||
GuidKeys = (dict.fromkeys(x for x in P.Guids if x not in P._PrivateGuids)).keys()
|
GuidKeys = [x for x in P.Guids if x not in P._PrivateGuids]
|
||||||
if CName in GuidKeys:
|
if CName in GuidKeys:
|
||||||
return P.Guids[CName]
|
return P.Guids[CName]
|
||||||
return None
|
return None
|
||||||
|
@ -650,7 +650,7 @@ def ProtocolValue(CName, PackageList, Inffile = None):
|
||||||
ProtocolKeys = P.Protocols.keys()
|
ProtocolKeys = P.Protocols.keys()
|
||||||
if Inffile and P._PrivateProtocols:
|
if Inffile and P._PrivateProtocols:
|
||||||
if not Inffile.startswith(P.MetaFile.Dir):
|
if not Inffile.startswith(P.MetaFile.Dir):
|
||||||
ProtocolKeys = (dict.fromkeys(x for x in P.Protocols if x not in P._PrivateProtocols)).keys()
|
ProtocolKeys = [x for x in P.Protocols if x not in P._PrivateProtocols]
|
||||||
if CName in ProtocolKeys:
|
if CName in ProtocolKeys:
|
||||||
return P.Protocols[CName]
|
return P.Protocols[CName]
|
||||||
return None
|
return None
|
||||||
|
@ -669,7 +669,7 @@ def PpiValue(CName, PackageList, Inffile = None):
|
||||||
PpiKeys = P.Ppis.keys()
|
PpiKeys = P.Ppis.keys()
|
||||||
if Inffile and P._PrivatePpis:
|
if Inffile and P._PrivatePpis:
|
||||||
if not Inffile.startswith(P.MetaFile.Dir):
|
if not Inffile.startswith(P.MetaFile.Dir):
|
||||||
PpiKeys = (dict.fromkeys(x for x in P.Ppis if x not in P._PrivatePpis)).keys()
|
PpiKeys = [x for x in P.Ppis if x not in P._PrivatePpis]
|
||||||
if CName in PpiKeys:
|
if CName in PpiKeys:
|
||||||
return P.Ppis[CName]
|
return P.Ppis[CName]
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue