Hello Piotr Kliczewski, Timothy Asir, Bala.FA, Dan Kenigsberg, I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/41218 to review the following change. Change subject: gluster: fix no attribute error ...................................................................... gluster: fix no attribute error This was introduced with the patch: https://gerrit.ovirt.org/#/c/40206/. In rhel6 and rhel7 this patch was passing the build. In fedora this was introducing AttributeError. This patch fixes that issue by selectively checking if attribute exists or not. Change-Id: Ie4ee6f3d62e51c67db12b4859da6508c50e92753 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1209493 Signed-off-by: Timothy Asir Jeyasingh <tjeya...@redhat.com> Reviewed-on: https://gerrit.ovirt.org/41056 Reviewed-by: Federico Simoncelli <fsimo...@redhat.com> Tested-by: Piotr Kliczewski <piotr.kliczew...@gmail.com> Tested-by: Darshan N <dnara...@redhat.com> Reviewed-by: Bala.FA <barum...@redhat.com> Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg <dan...@redhat.com> --- M vdsm/gluster/storagedev.py 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/18/41218/1 diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py index db2ffec..0eea52c 100644 --- a/vdsm/gluster/storagedev.py +++ b/vdsm/gluster/storagedev.py @@ -79,7 +79,12 @@ info['model'] = device.type if device.format: info['uuid'] = device.format.uuid or '' - dev = udev.get_device(device.sysfsPath) or {} + if hasattr(udev, 'get_device'): + dev = udev.get_device(device.sysfsPath) + elif hasattr(udev, 'udev_get_device'): + dev = udev.udev_get_device(device.sysfsPath) + else: + dev = {} info['fsType'] = device.format.type or dev.get('ID_FS_TYPE', '') if hasattr(device.format, 'mountpoint'): info['mountPoint'] = device.format.mountpoint or '' -- To view, visit https://gerrit.ovirt.org/41218 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4ee6f3d62e51c67db12b4859da6508c50e92753 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5-gluster Gerrit-Owner: Darshan N <dnara...@redhat.com> Gerrit-Reviewer: Bala.FA <barum...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Timothy Asir <tjeya...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches