Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guard better against RaidChooser's selected_level being None
This happens more often since blivet dropped linear from mdraid in storaged-project/blivet#1236 . It was the only RAID level supported for mdraid that had min_members of 1. When you add the first member for a new mdraid set, of course, there is only one member. RaidChooser's update method checks the `min_members` on each level and only adds it to the liststore of available levels if we currently have at least that many members. So, before that blivet change, when there was only one member, "linear" was the only level in the liststore, and was necessarily the selected_level. Now linear is gone, when there is only one member of an mdraid set, there are *no* levels in the liststore, which means selected_level winds up being None. There are three places I can see in add_dialog.py which don't guard against selected_level being None. This fixes each of them. Signed-off-by: Adam Williamson <awilliam@redhat.com>
- Loading branch information