[PATCH 12/13] If there's only one disk, select it by default.
David Lehman
dlehman at redhat.com
Wed Aug 29 00:00:51 UTC 2012
---
pyanaconda/ui/gui/spokes/storage.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 4916a3b..02c2be4 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -415,6 +415,10 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.disks = getDisks(self.storage.devicetree)
+ # if there's only one disk, select it by default
+ if len(self.disks) == 1 and not self.selected_disks:
+ self.selected_disks = [self.disks[0].name]
+
with gdk_threaded():
# properties: kind, description, capacity, os, popup-info
for disk in self.disks:
--
1.7.7.6
More information about the anaconda-patches
mailing list