[f21/master] Fix switching environments when no environment is selected (#1018226)

Brian C. Lane bcl at redhat.com
Wed Oct 22 22:16:36 UTC 2014


On Wed, Oct 22, 2014 at 04:56:57PM -0400, David Shea wrote:
> A side-effect of handling kickstarts with no %package section is that
> sometimes the previously selected environment is None.
> ---
>  pyanaconda/ui/gui/spokes/software.py | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
> index 5e26b65..8fa17cc 100644
> --- a/pyanaconda/ui/gui/spokes/software.py
> +++ b/pyanaconda/ui/gui/spokes/software.py
> @@ -417,9 +417,10 @@ class SoftwareSelectionSpoke(NormalSpoke):
>  
>          # Remove all the groups that were selected by the previously
>          # selected environment.
> -        for groupid in self.payload.environmentGroups(self.environment):
> -            if groupid in self.selectedGroups:
> -                self.selectedGroups.remove(groupid)
> +        if self.environment:
> +            for groupid in self.payload.environmentGroups(self.environment):
> +                if groupid in self.selectedGroups:
> +                    self.selectedGroups.remove(groupid)
>  
>          # Then mark the clicked environment as selected and update the screen.
>          self.environment = self.payload.environments[row.get_index()]
> -- 
> 2.1.0

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list