]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: use set instead of list for a variable to be used with in
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>
Tue, 10 Apr 2018 23:17:23 +0000 (07:17 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 17 Apr 2018 12:48:53 +0000 (20:48 +0800)
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>
BaseTools/Source/Python/AutoGen/AutoGen.py

index 98e3b20bd1e5903ca2ee3c83659b1deb846f29f9..a4e36d1a2fb4f3a47157f932157d7a7e8a86f222 100644 (file)
@@ -1450,13 +1450,10 @@ class PlatformAutoGen(AutoGen):
                         self._NonDynaPcdList_.remove (self._NonDynaPcdList_[Index])\r
                         PcdFromModule.Pending = False\r
                         self._NonDynaPcdList_.append (PcdFromModule)\r
-        # Parse the DynamicEx PCD from the AsBuild INF module list of FDF.\r
-        DscModuleList = []\r
-        for ModuleInf in self.Platform.Modules.keys():\r
-            DscModuleList.append (os.path.normpath(ModuleInf.Path))\r
+        DscModuleSet = {os.path.normpath(ModuleInf.Path) for ModuleInf in self.Platform.Modules}\r
         # add the PCD from modules that listed in FDF but not in DSC to Database \r
         for InfName in FdfModuleList:\r
-            if InfName not in DscModuleList:\r
+            if InfName not in DscModuleSet:\r
                 InfClass = PathClass(InfName)\r
                 M = self.BuildDatabase[InfClass, self.Arch, self.BuildTarget, self.ToolChain]\r
                 # If a module INF in FDF but not in current arch's DSC module list, it must be module (either binary or source) \r