[PATCH 03/13] Split string of symlinks into array of strings (#1136214)

David Lehman dlehman at redhat.com
Wed May 27 18:16:04 UTC 2015


From: mulhern <amulhern at redhat.com>

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>
(cherry picked from commit 4ea21ea9fa6bc0213ad5de0b164c00ffde4b5058)
---
 blivet/udev.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/blivet/udev.py b/blivet/udev.py
index 44c2aac..dd9b2d9 100644
--- a/blivet/udev.py
+++ b/blivet/udev.py
@@ -300,7 +300,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):
-- 
2.1.0



More information about the anaconda-patches mailing list