From 992fbe3519c0a0b643b93ecbf9bd6297c9117714 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Fri, 20 Apr 2018 23:51:43 +0800 Subject: BaseTools: AutoGen - use dafultdict instead of dict since we manually make each entry a set(), just use defaultdict(set) Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'BaseTools/Source') 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]: -- cgit v1.2.3