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 > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 12-16-2009, 04:01 PM
David Lehman
 
Default Expand PartitionDevice.__str__ to include partition geometry and flags.

---
storage/devices.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 1598497..c55abb8 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -926,11 +926,20 @@ class PartitionDevice(StorageDevice):
s = StorageDevice.__str__(self)
s += (" grow = %(grow)s max size = %(maxsize)s bootable = %(bootable)s
"
" part type = %(partType)s primary = %(primary)s
"
- " partedPartition = %(partedPart)r disk = %(disk)r" %
+ " partedPartition = %(partedPart)r disk = %(disk)r
" %
{"grow": self.req_grow, "maxsize": self.req_max_size,
"bootable": self.bootable, "partType": self.partType,
"primary": self.req_primary,
"partedPart": self.partedPartition, "disk": self.disk})
+
+ if self.partedPartition:
+ s += (" start = %(start)s end = %(end)s length = %(length)s
"
+ " flags = %(flags)s" %
+ {"length": self.partedPartition.geometry.length,
+ "start": self.partedPartition.geometry.start,
+ "end": self.partedPartition.geometry.end,
+ "flags": self.partedPartition.getFlagsAsString()})
+
return s

def writeKS(self, f, preexisting=False, noformat=False, s=None):
--
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 08:09 PM.

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