summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2018-04-20 23:51:43 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-26 14:44:35 +0800
commit992fbe3519c0a0b643b93ecbf9bd6297c9117714 (patch)
tree79e9bbda889742693dc79f2098d5e2cb11c49db1 /BaseTools/Source/Python
parentdc2c30ef92324afcdda2f01f76e4bde3c750ad8f (diff)
downloadedk2-992fbe3519c0a0b643b93ecbf9bd6297c9117714.tar.gz
edk2-992fbe3519c0a0b643b93ecbf9bd6297c9117714.tar.bz2
edk2-992fbe3519c0a0b643b93ecbf9bd6297c9117714.zip
BaseTools: AutoGen - use dafultdict instead of dict
since we manually make each entry a set(), just use defaultdict(set) 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')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 20f1c2da1e..7b37dd2561 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -355,10 +355,9 @@ class WorkspaceAutoGen(AutoGen):
# but the path (self.MetaFile.Path) is the real path
for key in self.FdfProfile.InfDict:
if key == 'ArchTBD':
- MetaFile_cache = {}
+ MetaFile_cache = defaultdict(set)
for Arch in self.ArchList:
Current_Platform_cache = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
- MetaFile_cache[Arch] = set()
for Pkey in Current_Platform_cache.Modules:
MetaFile_cache[Arch].add(Current_Platform_cache.Modules[Pkey].MetaFile)
for Inf in self.FdfProfile.InfDict[key]: