summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-04-05 22:00:24 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-09 14:02:57 +0800
commit175a4b5db39f57721022990ac8b92cf33015fa0b (patch)
tree370f6fc00672ee53f627c054afdba60c6784e27e
parent95cc4962167572089a99be324574094ba22415ad (diff)
downloadedk2-175a4b5db39f57721022990ac8b92cf33015fa0b.tar.gz
edk2-175a4b5db39f57721022990ac8b92cf33015fa0b.tar.bz2
edk2-175a4b5db39f57721022990ac8b92cf33015fa0b.zip
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>
-rw-r--r--BaseTools/Source/Python/Common/Misc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 5e9a104305..23c1a4a0b2 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -631,7 +631,7 @@ def GuidValue(CName, PackageList, Inffile = None):
GuidKeys = P.Guids.keys()
if Inffile and P._PrivateGuids:
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:
return P.Guids[CName]
return None
@@ -650,7 +650,7 @@ def ProtocolValue(CName, PackageList, Inffile = None):
ProtocolKeys = P.Protocols.keys()
if Inffile and P._PrivateProtocols:
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:
return P.Protocols[CName]
return None
@@ -669,7 +669,7 @@ def PpiValue(CName, PackageList, Inffile = None):
PpiKeys = P.Ppis.keys()
if Inffile and P._PrivatePpis:
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:
return P.Ppis[CName]
return None