[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 2/3] Fall back on regular device name (#604776)



In deviceNameToDiskByPath() we call udev_device_get_by_path().  If there
is no by-path symlink for the device, we get None back.  Rather than
return None, fall back on udev_device_get_name(info).
---
 storage/udev.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/udev.py b/storage/udev.py
index 0a22339..738cea0 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -298,7 +298,7 @@ def udev_device_get_by_path(info):
             if link.startswith('/dev/disk/by-path/'):
                 return link
 
-    return None
+    return udev_device_get_name(info)
 
 def udev_device_get_sysfs_path(info):
     return info['sysfs_path']
-- 
1.7.0.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]