public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jaben Carsey <jaben.carsey@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>, Yonghong Zhu <yonghong.zhu@intel.com>
Subject: [PATCH v1 1/1] BaseTools: dont make temporary dict
Date: Thu,  5 Apr 2018 07:00:24 -0700	[thread overview]
Message-ID: <a46d029c3ccee308bbcfd3d18d304f0b2738e511.1522936804.git.jaben.carsey@intel.com> (raw)
In-Reply-To: <cover.1522936804.git.jaben.carsey@intel.com>

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



       reply	other threads:[~2018-04-05 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1522936804.git.jaben.carsey@intel.com>
2018-04-05 14:00 ` Jaben Carsey [this message]
2018-04-09  6:01   ` [PATCH v1 1/1] BaseTools: dont make temporary dict Zhu, Yonghong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a46d029c3ccee308bbcfd3d18d304f0b2738e511.1522936804.git.jaben.carsey@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox