Change in vdsm[master]: v2v: add try/except to get_external_vms
fromani at redhat.com
fromani at redhat.com
Thu Dec 3 12:52:40 UTC 2015
Francesco Romani has posted comments on this change.
Change subject: v2v: add try/except to get_external_vms
......................................................................
Patch Set 4: Code-Review-1
(1 comment)
thanks, almost there, but exception() is not yet used correctly.
https://gerrit.ovirt.org/#/c/49507/4/vdsm/v2v.py
File vdsm/v2v.py:
Line 154: params = {}
Line 155: try:
Line 156: _add_vm_info(vm, params)
Line 157: except libvirt.libvirtError as e:
Line 158: logging.exception("error getting domain information: %s", e)
if we use exception, we don't need to explictely log the exception object, it is done automatically by the method.
So, we can just write:
logging.exception("error getting domain information')
for details, see
https://docs.python.org/2/library/logging.html#logging.Logger.exception
Line 159: continue
Line 160: try:
Line 161: xml = vm.XMLDesc(0)
Line 162: except libvirt.libvirtError as e:
--
To view, visit https://gerrit.ovirt.org/49507
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iec63dea83ec1805cf08d35be7c078edfd2f70966
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list