Francesco Romani has uploaded a new change for review. Change subject: virt: migration: replace magic number ......................................................................
virt: migration: replace magic number replace a magic constant with the symbolic name to clarify the intent of the code. What the code does is to check the migration job is still active. The symbolic name was found by checking the docs: http://libvirt.org/html/libvirt-libvirt.html#virDomainJobInfo (beware of misalinged comments). 'jobType' can be one of http://libvirt.org/html/libvirt-libvirt.html#virDomainJobType Change-Id: I7ef125866ed7d1590f1c0cee0084daf86c6ee912 Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/migration.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/28356/1 diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index b5d840d..76f0922 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -468,7 +468,7 @@ ' Refer to RHBZ#919201.', dataRemaining / Mbytes, self._lowmark / Mbytes) - if jobType != 0: + if jobType != libvirt.VIR_DOMAIN_JOB_NONE: self.progress = update_progress(dataRemaining, dataTotal) self._vm.log.info('Migration Progress: %s seconds elapsed,' ' %s%% of data processed' % -- To view, visit http://gerrit.ovirt.org/28356 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ef125866ed7d1590f1c0cee0084daf86c6ee912 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches