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
|