With Python3, the dict.value() method returns an iterator.
If a dictionary is updated while an iterator on its keys is used,
a RuntimeError is generated.
Converting the iterator to a list() forces a copy of the mutable
keys in an immutable list which can be safely iterated.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
if NewPcd2 not in GlobalData.MixedPcd[item]:\r
GlobalData.MixedPcd[item].append(NewPcd2)\r
\r
- for BuildData in PGen.BuildDatabase._CACHE_.values():\r
+ for BuildData in list(PGen.BuildDatabase._CACHE_.values()):\r
if BuildData.Arch != Arch:\r
continue\r
for key in BuildData.Pcds:\r