[blivet:master] Split string of symlinks into array of strings (#1136214)
mulhern
amulhern at redhat.com
Tue Sep 2 12:20:29 UTC 2014
Resolves: fed#1136214
pyudev library returns a string whereas blivet's pyudev library returned an
array of string. Our udev code should persist in returning an array of
strings.
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/udev.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/blivet/udev.py b/blivet/udev.py
index 890b05a..107d12e 100644
--- a/blivet/udev.py
+++ b/blivet/udev.py
@@ -286,7 +286,13 @@ def device_get_path(info):
return info["ID_PATH"]
def device_get_symlinks(info):
- return info.get("DEVLINKS", [])
+ """ Get an array of symbolic links for a device.
+
+ :param info: a :class:`pyudev.Device` instance
+ :returns: list of symbolic links
+ :rtype: list of str
+ """
+ return info.get("DEVLINKS", "").split()
def device_get_by_path(info):
for link in device_get_symlinks(info):
--
1.9.3
More information about the anaconda-patches
mailing list