Dan Kenigsberg has posted comments on this change. Change subject: hooks: ovs: skip non-vNic device's XML ......................................................................
Patch Set 2: Code-Review-1 (1 comment) https://gerrit.ovirt.org/#/c/49183/2/vdsm_hooks/ovs/ovs_before_device_create.py File vdsm_hooks/ovs/ovs_before_device_create.py: Line 32: network is set as a source. Line 33: """ Line 34: try: Line 35: iface = domxml.getElementsByTagName('interface')[0] Line 36: source = iface.getElementsByTagName('source')[0] make sure your try-except blocks are as tiny as possible. In this case, keep only the iface line in. Line 37: except IndexError: Line 38: # This is not a vNic device Line 39: return Line 40: source_bridge = source.getAttribute('bridge') -- To view, visit https://gerrit.ovirt.org/49183 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I457d43847f07cccbd56b562fbc7c111a0bb0e1a3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Ido Barkan <ibar...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches