* [Patch 2/2] BaseTools: Fix a Eot issue.
@ 2019-02-25 9:22 Feng, Bob C
2019-02-25 13:24 ` Gao, Liming
0 siblings, 1 reply; 2+ messages in thread
From: Feng, Bob C @ 2019-02-25 9:22 UTC (permalink / raw)
To: edk2-devel; +Cc: Bob Feng, Liming Gao
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>
---
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
@@ -389,11 +389,11 @@ class FirmwareVolume(Image):
FfsSecCoreGuid = None
FfsPeiCoreGuid = 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
continue
if Ffs.Type == 0x04:
@@ -495,11 +495,11 @@ class FirmwareVolume(Image):
EotGlobalData.gPpiList[Record[0].lower()] = 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
Ffs = self.UnDispatchedFfsDict[FfsID]
if Ffs.Type == 0x07:
@@ -560,11 +560,11 @@ class FirmwareVolume(Image):
if IsInstalled:
self.DisPatchDxe(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
Ffs = self.UnDispatchedFfsDict[FfsID]
if Ffs.Type == 0x06 or Ffs.Type == 0x08:
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch 2/2] BaseTools: Fix a Eot issue.
2019-02-25 9:22 [Patch 2/2] BaseTools: Fix a Eot issue Feng, Bob C
@ 2019-02-25 13:24 ` Gao, Liming
0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2019-02-25 13:24 UTC (permalink / raw)
To: Feng, Bob C, edk2-devel@lists.01.org
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Feng, Bob C
> Sent: Monday, February 25, 2019 5:23 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [edk2] [Patch 2/2] 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 <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> ---
> 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
> @@ -389,11 +389,11 @@ class FirmwareVolume(Image):
> FfsSecCoreGuid = None
> FfsPeiCoreGuid = 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
> continue
> if Ffs.Type == 0x04:
> @@ -495,11 +495,11 @@ class FirmwareVolume(Image):
> EotGlobalData.gPpiList[Record[0].lower()] = 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
> Ffs = self.UnDispatchedFfsDict[FfsID]
> if Ffs.Type == 0x07:
> @@ -560,11 +560,11 @@ class FirmwareVolume(Image):
> if IsInstalled:
> self.DisPatchDxe(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
> Ffs = self.UnDispatchedFfsDict[FfsID]
> if Ffs.Type == 0x06 or Ffs.Type == 0x08:
> --
> 2.20.1.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-25 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-25 9:22 [Patch 2/2] BaseTools: Fix a Eot issue Feng, Bob C
2019-02-25 13:24 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox