Change in vdsm[master]: v2v: add try/except to get_external_vms

fromani at redhat.com fromani at redhat.com
Thu Dec 3 12:16:36 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: v2v: add try/except to get_external_vms
......................................................................


Patch Set 3:

(2 comments)

part of Milan's comment was unanswered, and I'm reposting it :)
Besides that, looks better, thanks!

https://gerrit.ovirt.org/#/c/49507/3/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.error("error getting domain infomation: %s", e)
> I see, thanks for clarification.
typo: should be infoRmation.
Also, if you want to log the exception (and I think we should), please use something like

  logging.exception("some helpful message")
Line 159:                 continue
Line 160:             try:
Line 161:                 xml = vm.XMLDesc(0)
Line 162:             except libvirt.libvirtError as e:


Line 165:                 continue
Line 166:             try:
Line 167:                 root = ET.fromstring(xml)
Line 168:             except ET.ParseError as e:
Line 169:                 logging.error('error parsing domain xml: %s', e)
> The same.
same as my previous comment about exception()
Line 170:                 continue
Line 171:             try:
Line 172:                 _add_general_info(root, params)
Line 173:             except InvalidVMConfiguration 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: 3
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