* [PATCH v1 1/1] BaseTools: dont make temporary dict [not found] <cover.1522936804.git.jaben.carsey@intel.com> @ 2018-04-05 14:00 ` Jaben Carsey 2018-04-09 6:01 ` Zhu, Yonghong 0 siblings, 1 reply; 2+ messages in thread From: Jaben Carsey @ 2018-04-05 14:00 UTC (permalink / raw) To: edk2-devel; +Cc: Liming Gao, Yonghong Zhu 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> --- BaseTools/Source/Python/Common/Misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index d1752d8a624e..15358aa5603e 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -833,7 +833,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 @@ -852,7 +852,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 @@ -871,7 +871,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 -- 2.16.2.windows.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] BaseTools: dont make temporary dict 2018-04-05 14:00 ` [PATCH v1 1/1] BaseTools: dont make temporary dict Jaben Carsey @ 2018-04-09 6:01 ` Zhu, Yonghong 0 siblings, 0 replies; 2+ messages in thread From: Zhu, Yonghong @ 2018-04-09 6:01 UTC (permalink / raw) To: Carsey, Jaben, edk2-devel@lists.01.org; +Cc: Gao, Liming, Zhu, Yonghong Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben Sent: Friday, April 06, 2018 7:14 AM To: edk2-devel@lists.01.org Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com> Subject: [PATCH v1 1/1] 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> --- BaseTools/Source/Python/Common/Misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index d1752d8a624e..15358aa5603e 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -833,7 +833,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 @@ -852,7 +852,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 @@ -871,7 +871,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 -- 2.16.2.windows.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-09 6:01 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <cover.1522936804.git.jaben.carsey@intel.com> 2018-04-05 14:00 ` [PATCH v1 1/1] BaseTools: dont make temporary dict Jaben Carsey 2018-04-09 6:01 ` Zhu, Yonghong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox