[PATCH 6/8] Improve disklabel's name attr so we don't have to hide them anymore.

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

 



---
 storage/formats/disklabel.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py
index a49bd6e..c783ee6 100644
--- a/storage/formats/disklabel.py
+++ b/storage/formats/disklabel.py
@@ -41,10 +41,9 @@ log = logging.getLogger("storage")
 class DiskLabel(DeviceFormat):
     """ Disklabel """
     _type = "disklabel"
-    _name = None
+    _name = "partition table"
     _formattable = True                # can be formatted
     _supported = False                 # is supported
-    _hidden = True                     # hide devices with this formatting?
 
     def __init__(self, *args, **kwargs):
         """ Create a DiskLabel instance.
@@ -133,6 +132,15 @@ class DiskLabel(DeviceFormat):
         return self._partedDevice
 
     @property
+    def labelType(self):
+        """ The disklabel type (eg: 'gpt', 'msdos') """
+        return self.partedDisk.type
+
+    @property
+    def name(self):
+        return "%s (%s)" % (self._name, self.labelType.upper())
+
+    @property
     def size(self):
         size = self._size
         if not size:
-- 
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux