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

[PATCH 3/5] Add ID_SERIAL in as a backup in case there's no ID_SERIAL_SHORT.



---
 storage/udev.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/udev.py b/storage/udev.py
index 7ed7cc4..4bef451 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -242,7 +242,7 @@ def udev_device_is_partition(info):
 
 def udev_device_get_serial(udev_info):
     """ Get the serial number/UUID from the device as reported by udev. """
-    return udev_info.get("ID_SERIAL_SHORT")
+    return udev_info.get("ID_SERIAL_SHORT", udev_info.get("ID_SERIAL"))
 
 def udev_device_get_wwid(udev_info):
     """ The WWID of a device is typically just its serial number, but with
-- 
1.6.5.1


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