On Tue, 2014-02-25 at 08:59 -0500, Samantha N. Bueno wrote:
On Tue, Feb 25, 2014 at 01:04:07PM +0100, Vratislav Podzimek wrote:
On Tue, 2014-02-25 at 04:30 -0500, Samantha N. Bueno wrote:
Since the installer can handle unformatted DASDs, all of them should be viewable and selectable from the storage spoke.
Resolves: rhbz#1064423
pyanaconda/ui/lib/disks.py | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/lib/disks.py b/pyanaconda/ui/lib/disks.py index 486208b..010b9af 100644 --- a/pyanaconda/ui/lib/disks.py +++ b/pyanaconda/ui/lib/disks.py @@ -53,11 +53,24 @@ def getDisks(devicetree, fake=False): if not flags.imageInstall: devices += devicetree._hidden
disks = [d for d in devices if d.isDisk andd.mediaPresent andnot d.format.hidden andnot (d.protected andd.removable)]+# disks = [d for d in devices if d.isDisk and +# d.mediaPresent and +# not d.format.hidden and +# not (d.protected and +# d.removable)] +#
We probably don't need this nice piece of history anymore. :)
Ha, very true. ;) Removed.
disks = []for d in devices:if d.isDisk and not d.format.hidden and not (d.protected and d.removable):What about the 'd.mediaPresent' check?
Ahh, right. So unformatted DASDs will fail that and the size > 0 check, hence why I just ignore those if disk.type == "dasd". But I could make my conditional instead:
if d.type == "dasd": disks.append(d) elif d.size > 0 and d.mediaPresent: disks.append(d)
This looks good to me.