[master/rhel7] Add more details to iso device selector (#971290)

Brian C. Lane bcl at redhat.com
Wed Sep 4 23:36:31 UTC 2013


From: "Brian C. Lane" <bcl at redhat.com>

Add the device path, format and label or uuid to the dropdown. uuid is
only shown if there is no label.

-- See and example here: http://bcl.fedorapeople.org/images/isofile.png
---
 pyanaconda/ui/gui/spokes/source.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 8dd8ba2..e8fb3c5 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -625,7 +625,14 @@ class SourceSpoke(NormalSpoke):
         active = 0
         idx = 0
         for dev in potentialHdisoSources(self.storage.devicetree):
-            store.append([dev, "%s (%s MB)" % (self._sanitize_model(dev.disk.model), int(dev.size))])
+            # path model size format type uuid of format
+            dev_info = { "model" : self._sanitize_model(dev.disk.model),
+                         "path"  : dev.path,
+                         "size"  : dev.size,
+                         "format": dev.format.name or "",
+                         "label" : dev.format.label or dev.format.uuid or ""
+                       }
+            store.append([dev, "%(model)s %(path)s (%(size)s MB) %(format)s %(label)s" % dev_info])
             if self.data.method.method == "harddrive" and dev.name == self.data.method.partition:
                 active = idx
             added = True
-- 
1.8.3.1



More information about the anaconda-patches mailing list