Change in vdsm[master]: Remove redundant exception assignations.

asegurap at redhat.com asegurap at redhat.com
Tue Jan 15 11:25:44 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: Remove redundant exception assignations.
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File vdsm/libvirtvm.py
Line 1659:                                vnicXML.toprettyxml(encoding='utf-8'),
Line 1660:                                exc_info=True)
Line 1661:                 raise SetLinkAndNetworkError(e.message)
Line 1662:             yield
Line 1663:         except Exception:
In general I'd prefer not to do that, as I think that except without type catches BaseException instead of Exception, meaning that it would also catch things like KeyboardInterrupt (resulting in a semantic change).
Line 1664:             # Rollback link and network.
Line 1665:             self.log.debug('Rolling back link and net for: %s', dev.alias,
Line 1666:                            exc_info=True)
Line 1667:             self._dom.updateDeviceFlags(vnicXMLBackup.toxml(encoding='utf-8'),


--
To view, visit http://gerrit.ovirt.org/11034
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5521612493ee9d5a57816fbcd8a54b174d29aefb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud at kohlvanwijngaarden.nl>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list