[RHEL 7.2 - PATCH 5/5] Ellipsize the file system type combo box

David Shea dshea at redhat.com
Mon Jul 6 15:04:45 UTC 2015


On 07/06/2015 10:53 AM, Robert Marshall wrote:
> @@ -1269,11 +1278,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>   
>       def _setup_fstype_combo(self, device):
>           # remove any fs types that aren't supported
> -        remove_indices = []
> +        remove_iters = []
>           for idx, row in enumerate(self._fsCombo.get_model()):
>               fs_type = row[0]
>               if fs_type not in self._fs_types:
> -                remove_indices.append(idx)
> +                remove_iters.append(fs_type.iter)
>                   continue
>   
>               if fs_type == device.format.name:

fs_type.iter should be row.iter.

> @@ -2337,7 +2346,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>           if not self._initialized:
>               return
>   
> -        new_type = combo.get_active_text()
> +        itr = combo.get_active_iter()
> +        if not itr:
> +            return
> +

The three new lines here are unnecessary, _get_fstype below handles all 
of that.

> +        new_type = self._get_fstype(combo)
>           if new_type is None:
>               return
>           log.debug("fs type changed: %s", new_type)
>



More information about the anaconda-patches mailing list