From dc082d50293751b918787e5db9566bcec150f474 Mon Sep 17 00:00:00 2001 From: "Feng, Bob C" Date: Mon, 25 Feb 2019 17:19:02 +0800 Subject: [PATCH] BaseTools: Fix a Eot issue. FirmwareVolume.UnDispatchedFfsDict is mutated during iteration, convert the FirmwareVolume.UnDispatchedFfsDict.keys() to a new list to resolve this problem. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Reviewed-by: Liming Gao --- BaseTools/Source/Python/Eot/EotMain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Eot/EotMain.py b/BaseTools/Source/Python/Eot/EotMain.py index 3020f6525e..4802aea8b1 100644 --- a/BaseTools/Source/Python/Eot/EotMain.py +++ b/BaseTools/Source/Python/Eot/EotMain.py @@ -391,7 +391,7 @@ class FirmwareVolume(Image): FfsDxeCoreGuid = None FfsPeiPrioriGuid = None FfsDxePrioriGuid = None - for FfsID in self.UnDispatchedFfsDict.keys(): + for FfsID in list(self.UnDispatchedFfsDict.keys()): Ffs = self.UnDispatchedFfsDict[FfsID] if Ffs.Type == 0x03: FfsSecCoreGuid = FfsID @@ -497,7 +497,7 @@ class FirmwareVolume(Image): def DisPatchDxe(self, Db): IsInstalled = False ScheduleList = sdict() - for FfsID in self.UnDispatchedFfsDict.keys(): + for FfsID in list(self.UnDispatchedFfsDict.keys()): CouldBeLoaded = False DepexString = '' FileDepex = None @@ -562,7 +562,7 @@ class FirmwareVolume(Image): def DisPatchPei(self, Db): IsInstalled = False - for FfsID in self.UnDispatchedFfsDict.keys(): + for FfsID in list(self.UnDispatchedFfsDict.keys()): CouldBeLoaded = True DepexString = '' FileDepex = None -- 2.39.2