[master/f23-branch] Fix traceback when trying to create list of unformatted DASDs. (#1268764)

David Lehman dlehman at redhat.com
Tue Oct 6 21:27:54 UTC 2015


On Tue, 2015-10-06 at 11:37 -0400, Samantha N. Bueno wrote:
> Have to pass in a list of DASD objects obtained from
> storage.devicetree.dasd
> since make_unformatted_dasd_list requires a list of DASD objects to
> process.
> Passing in self.selected_disks just sends in a list of strings
> (device names),
> which causes make_unformatted_dasd_list to fail.
> ---
>  pyanaconda/ui/gui/spokes/storage.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/storage.py
> b/pyanaconda/ui/gui/spokes/storage.py
> index 181e97c..6947028 100644
> --- a/pyanaconda/ui/gui/spokes/storage.py
> +++ b/pyanaconda/ui/gui/spokes/storage.py
> @@ -783,7 +783,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
>  
>      def _check_dasd_formats(self):
>          rc = DASD_FORMAT_NO_CHANGE
> -        dasds =
> self.storage.devicetree.make_unformatted_dasd_list(self.selected_disk
> s)
> +        dasds =
> self.storage.devicetree.make_unformatted_dasd_list([d for d in
> self.storage.devicetree.dasd])

Might as well just pass in self.storage.devicetree.dasd or, if
you want to make sure you're passing a copy of that list,
self.storage.devicetree.dasd[:]


>          if len(dasds) > 0:
>              # We want to apply current selection before running
> dasdfmt to
>              # prevent this information from being lost afterward


More information about the anaconda-patches mailing list