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

[PATCH 3/5] Fix usage of deviceNameToDiskByPath in devicetree.py (#589967)



Account for the recent changes in deviceNameToDiskByPath().
---
 storage/devicetree.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 1ed73c1..c171968 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1357,10 +1357,12 @@ class DeviceTree(object):
             initcb = lambda: True
         else:
             description = device.description or device.model
-            bypath = os.path.basename(deviceNameToDiskByPath(device.name))
+            bypath = deviceNameToDiskByPath(device.name)
             if bypath:
+                bypath = os.path.basename(bypath)
                 details = "\n\nDevice details:\n%s" % (bypath,)
             else:
+                bypath = device.name
                 details = ""
 
             initcb = lambda: self.intf.questionInitializeDisk(bypath,
-- 
1.6.6.1


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