FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-09-2009, 06:05 PM
David Lehman
 
Default Improve disklabel's name attr so we don't have to hide them anymore.

---
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org