just make the key list directly

Cc: Liming Gao <[email protected]>
Cc: Yonghong Zhu <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <[email protected]>
---
 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

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to