[master] Add option to select all hard drives in text mode. (#965580)
David Shea
dshea at redhat.com
Fri Oct 18 17:26:54 UTC 2013
On 10/18/2013 01:22 PM, Samantha N. Bueno wrote:
> On Fri, Oct 18, 2013 at 01:04:17PM -0400, David Shea wrote:
>> On 10/18/2013 12:08 PM, Samantha N. Bueno wrote:
>>> def input(self, args, key):
>>> """Grab the disk choice and update things"""
>>> try:
>>> keyid = int(key) - 1
>>> - self._update_disk_list(self.disks[keyid])
>>> + self.selection = keyid
>>> + if keyid == len(self.disks):
>>> + self._select_all_disks()
>>> + else:
>>> + self._update_disk_list(self.disks[keyid])
>>> return INPUT_PROCESSED
>>> except (ValueError, IndexError):
>>> if key.lower() == "c":
>> This part is still active if there's only one disk. So I could hit
>> "2" and it would select all one disk, whereas before it would just
>> tell me to pick again because 2 isn't a thing.
> Oh, good catch. How about something like this:
>
> try:
> keyid = int(key) - 1
> self.selection = keyid
> if len(self.disks) > 1 and keyid == len(self.disks):
> self._select_all_disks()
> ....
>
> That should fix it.
>
> Samantha
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Sure does. Ack.
More information about the anaconda-patches
mailing list