Change in vdsm[master]: hostdev: expose 'driver' attribute
fromani at redhat.com
fromani at redhat.com
Wed Mar 23 10:20:29 UTC 2016
Francesco Romani has posted comments on this change.
Change subject: hostdev: expose 'driver' attribute
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
conceptually fine, but I'd try to avoid catching AttributeError. Let's discuss this.
https://gerrit.ovirt.org/#/c/55044/2/lib/vdsm/hostdev.py
File lib/vdsm/hostdev.py:
PS2, Line 128: devXML.find('./driver/name')
if this is missing then devXML.find() returns None IIRC.
Then, I find this a bit clearer:
driver_name = devXML.find('./driver/name')
if driver_name is not None:
params['driver'] = driver_name.text
# else no driver exposed by libvirt/sysfs
You are welcome to take any different approach, my problem here is AttributeError is too generic.
--
To view, visit https://gerrit.ovirt.org/55044
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I81463100dd07a2bc4fb241f89581db2060b8982e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list