Change in vdsm[master]: gluster:fix NoneType error for some devices does not contain...
tjeyasin at redhat.com
tjeyasin at redhat.com
Thu May 21 10:03:13 UTC 2015
Timothy Asir has uploaded a new change for review.
Change subject: gluster:fix NoneType error for some devices does not contain sysfsPath
......................................................................
gluster:fix NoneType error for some devices does not contain sysfsPath
Currently devices list returns the list of available disks and
its fs type properly. However it fails for some devices which does
not contain sysfsPath and the dev details become None.
This patch fixes this error by assigning empty dictonary if
the dev is empty or None.
Change-Id: I54efdf3958519e2ae038b527a03e0b57569c2e8f
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin at redhat.com>
---
M vdsm/gluster/storagedev.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/41262/1
diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py
index 0eea52c..4077578 100644
--- a/vdsm/gluster/storagedev.py
+++ b/vdsm/gluster/storagedev.py
@@ -80,9 +80,9 @@
if device.format:
info['uuid'] = device.format.uuid or ''
if hasattr(udev, 'get_device'):
- dev = udev.get_device(device.sysfsPath)
+ dev = udev.get_device(device.sysfsPath) or {}
elif hasattr(udev, 'udev_get_device'):
- dev = udev.udev_get_device(device.sysfsPath)
+ dev = udev.udev_get_device(device.sysfsPath) or {}
else:
dev = {}
info['fsType'] = device.format.type or dev.get('ID_FS_TYPE', '')
--
To view, visit https://gerrit.ovirt.org/41262
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54efdf3958519e2ae038b527a03e0b57569c2e8f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin at redhat.com>
More information about the vdsm-patches
mailing list