summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-12-15 18:25:46 -0600
committerDavid Lehman <dlehman@redhat.com>2009-12-16 12:26:38 -0600
commitd4ac61a96989768805769777e6642d42a0fb4edb (patch)
tree1ae489ca8d4a5c1db8be518d40c764a1b924b853 /storage
parent996621a5898fe56b35273eb5ef4de974e07531e2 (diff)
downloadanaconda-d4ac61a96989768805769777e6642d42a0fb4edb.tar.gz
anaconda-d4ac61a96989768805769777e6642d42a0fb4edb.tar.xz
anaconda-d4ac61a96989768805769777e6642d42a0fb4edb.zip
Expand PartitionDevice.__str__ to include partition geometry and flags.
Diffstat (limited to 'storage')
-rw-r--r--storage/devices.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/storage/devices.py b/storage/devices.py
index 62bebd01a..1065a68a4 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -927,11 +927,20 @@ class PartitionDevice(StorageDevice):
s = StorageDevice.__str__(self)
s += (" grow = %(grow)s max size = %(maxsize)s bootable = %(bootable)s\n"
" part type = %(partType)s primary = %(primary)s\n"
- " partedPartition = %(partedPart)r disk = %(disk)r" %
+ " partedPartition = %(partedPart)r disk = %(disk)r\n" %
{"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\n"
+ " 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):