Skip to content

Commit

Permalink
BaseTools: Fix a Eot issue.
Browse files Browse the repository at this point in the history
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 <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
  • Loading branch information
BobCF committed Feb 26, 2019
1 parent dde29b9 commit dc082d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BaseTools/Source/Python/Eot/EotMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def Dispatch(self, Db=None):
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
Expand Down Expand Up @@ -497,7 +497,7 @@ def LoadPpi(self, Db, ModuleGuid):
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
Expand Down Expand Up @@ -562,7 +562,7 @@ def DisPatchDxe(self, Db):

def DisPatchPei(self, Db):
IsInstalled = False
for FfsID in self.UnDispatchedFfsDict.keys():
for FfsID in list(self.UnDispatchedFfsDict.keys()):
CouldBeLoaded = True
DepexString = ''
FileDepex = None
Expand Down

0 comments on commit dc082d5

Please sign in to comment.