[[PATCH rhel7-branch] 3/5] Don't include zero sized disks in the custom part UI either (#903131).
Chris Lumens
clumens at redhat.com
Mon Jan 27 15:09:16 UTC 2014
While I'm at it, I changed the original patch for this bug to use the same
test.
---
pyanaconda/ui/gui/spokes/custom.py | 5 ++++-
pyanaconda/ui/lib/disks.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index dc9866f..2c3aed7 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -858,11 +858,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.__storage = self.storage.copy()
self._media_disks = []
- # hide removable disks containing install media
for disk in self.__storage.disks:
if disk.removable and disk.protected:
+ # hide removable disks containing install media
self._media_disks.append(disk)
self.__storage.devicetree.hide(disk)
+ elif not disk.mediaPresent:
+ # hide disks that have no media
+ self.__storage.devicetree.hide(disk)
self._devices = self.__storage.devices
diff --git a/pyanaconda/ui/lib/disks.py b/pyanaconda/ui/lib/disks.py
index 6726662..486208b 100644
--- a/pyanaconda/ui/lib/disks.py
+++ b/pyanaconda/ui/lib/disks.py
@@ -54,7 +54,7 @@ def getDisks(devicetree, fake=False):
devices += devicetree._hidden
disks = [d for d in devices if d.isDisk and
- d.size > 0 and
+ d.mediaPresent and
not d.format.hidden and
not (d.protected and
d.removable)]
--
1.8.3.1
More information about the anaconda-patches
mailing list