Francesco Romani has uploaded a new change for review. Change subject: migration: MonitorThread.progress could be None ......................................................................
migration: MonitorThread.progress could be None A future patch wants to provide richer progress reporting. This patch prepares the soil in the client locations, making sure we can handle None here. Change-Id: Ie073be7e783ee235475827244a3ca29452d73208 Backport-To: 3.6 Signed-off-by: Francesco Romani <[email protected]> --- M vdsm/virt/migration.py 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/52/57752/1 diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index 5a60c2b..a4c4135 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -142,7 +142,10 @@ """ if self._monitorThread is not None: # fetch migration status from the monitor thread - self._progress = self._monitorThread.progress + if self._monitorThread.progress is not None: + self._progress = self._monitorThread.progress + else: + self._progress = 0 self.status['progress'] = self._progress stat = self._vm._dom.jobStats(libvirt.VIR_DOMAIN_JOB_STATS_COMPLETED) -- To view, visit https://gerrit.ovirt.org/57752 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie073be7e783ee235475827244a3ca29452d73208 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
