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

[PATCH 4/4] Don't display free space at end of extended unless > 1MB. (#626025)



---
 pyanaconda/iw/partition_gui.py |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/iw/partition_gui.py b/pyanaconda/iw/partition_gui.py
index 4f33e69..de3b45c 100644
--- a/pyanaconda/iw/partition_gui.py
+++ b/pyanaconda/iw/partition_gui.py
@@ -443,12 +443,15 @@ class DiskStripeGraph(StripeGraph):
             sel_col = self.part_type_colors["sel_freespace"]
             xoffset = last_logical_offset
             xlength = last_extended_offset - last_logical_offset
-            slcstr = "%s\n%.0f MB" % (_("Free"), Decimal(str(drive.size)) * xlength)
-
-            slice = Slice(stripe, slcstr, stype, xoffset, xlength,
-                    dcCB = self.dcCB, cCB = self.cCB, sel_col=sel_col,
-                    unsel_col=unsel_col)
-            stripe.addSlice(slice)
+            # don't add a slice for free regions of <= 1MB
+            size = Decimal(str(drive.size)) * xlength
+            if size > 1:
+                slcstr = "%s\n%.0f MB" % (_("Free"), size)
+
+                slice = Slice(stripe, slcstr, stype, xoffset, xlength,
+                        dcCB = self.dcCB, cCB = self.cCB, sel_col=sel_col,
+                        unsel_col=unsel_col)
+                stripe.addSlice(slice)
 
         return stripe
 
-- 
1.7.2.3


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