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 <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/41056
Reviewed-by: Federico Simoncelli <[email protected]>
Tested-by: Piotr Kliczewski <[email protected]>
Tested-by: Darshan N <[email protected]>
Reviewed-by: Bala.FA <[email protected]>
Continuous-Integration: Jenkins CI
Reviewed-by: Dan Kenigsberg <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Bala.FA <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Timothy Asir <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches