[blivet:rhel7/master 3/5] Get rid of unnecessary raid_level variable (#1076055)

mulhern amulhern at redhat.com
Thu Sep 25 18:03:34 UTC 2014


Related: rhbz#1076055

A simple call to defaultRaidLevel() does the same thing.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 pyanaconda/ui/gui/spokes/custom.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 88e90d4..4c06cd7 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -3034,14 +3034,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         include_btrfs = False
         fs_type_sensitive = True
 
-        raid_level = None
         if new_type == DEVICE_TYPE_BTRFS:
             # add btrfs to the fstype combo and lock it in
             test_fmt = getFormat("btrfs")
             include_btrfs = test_fmt.supported and test_fmt.formattable
             fs_type_sensitive = False
-        elif new_type == DEVICE_TYPE_MD:
-            raid_level = defaultRaidLevel(new_type)
 
         # lvm uses the RHS to set disk set. no foolish minds here.
         exists = self._current_selector and self._current_selector._device.exists
@@ -3052,7 +3049,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         # device type
         self._raidStoreFilter.refilter()
 
-        self._populate_raid(raid_level)
+        self._populate_raid(defaultRaidLevel(new_type))
         self._populate_container()
 
         fancy_set_sensitive(self._nameEntry, new_type in (DEVICE_TYPE_BTRFS, DEVICE_TYPE_LVM, DEVICE_TYPE_MD, DEVICE_TYPE_LVM_THINP))
-- 
1.9.3



More information about the anaconda-patches mailing list