summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/AutoGen.py
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-04-11 07:17:23 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-17 20:48:53 +0800
commit1563349a967d7e02c43492ba853babb9c660a083 (patch)
tree36c956e55a64bef8e489744b186f76caa54420b3 /BaseTools/Source/Python/AutoGen/AutoGen.py
parent066c71544ed1c0e1a703b26982f9da60d21bcc5a (diff)
downloadedk2-1563349a967d7e02c43492ba853babb9c660a083.tar.gz
edk2-1563349a967d7e02c43492ba853babb9c660a083.tar.bz2
edk2-1563349a967d7e02c43492ba853babb9c660a083.zip
BaseTools: use set instead of list for a variable to be used with in
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 98e3b20bd1..a4e36d1a2f 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1450,13 +1450,10 @@ class PlatformAutoGen(AutoGen):
self._NonDynaPcdList_.remove (self._NonDynaPcdList_[Index])
PcdFromModule.Pending = False
self._NonDynaPcdList_.append (PcdFromModule)
- # Parse the DynamicEx PCD from the AsBuild INF module list of FDF.
- DscModuleList = []
- for ModuleInf in self.Platform.Modules.keys():
- DscModuleList.append (os.path.normpath(ModuleInf.Path))
+ DscModuleSet = {os.path.normpath(ModuleInf.Path) for ModuleInf in self.Platform.Modules}
# add the PCD from modules that listed in FDF but not in DSC to Database
for InfName in FdfModuleList:
- if InfName not in DscModuleList:
+ if InfName not in DscModuleSet:
InfClass = PathClass(InfName)
M = self.BuildDatabase[InfClass, self.Arch, self.BuildTarget, self.ToolChain]
# If a module INF in FDF but not in current arch's DSC module list, it must be module (either binary or source)