Adam Litke has uploaded a new change for review. Change subject: LiveMerge: fix delete while iterating ......................................................................
LiveMerge: fix delete while iterating A coding mistake slipped into the onBlockJobEvent handler. We are iterating a dictionary while deleting items. We need to iterate over the keys in this case, not the k,v pairs. Change-Id: I6074c58c4c9aadd60cfe2ef813d46d70ecab3eae Signed-off-by: Adam Litke <ali...@redhat.com> --- M vdsm/virt/vm.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/28863/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 344af86..805dca1 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -5455,8 +5455,8 @@ # VMStatsThread and API calls. The _jobsLock ensures that a cohesive # data set is returned by serializing each call. with self._jobsLock: - for jobID, val in jobs.iteritems(): - if val is None: + for jobID in jobs.keys(): + if jobs[jobID] is None: self.untrackBlockJob(jobID) del jobs[jobID] return jobs -- To view, visit http://gerrit.ovirt.org/28863 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6074c58c4c9aadd60cfe2ef813d46d70ecab3eae Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <ali...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches