[f21/master] Fix switching environments when no environment is selected (#1018226)
dshea at redhat.com
Wed Oct 22 20:56:57 UTC 2014
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
@@ -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:
+ if self.environment:
+ for groupid in self.payload.environmentGroups(self.environment):
+ if groupid in self.selectedGroups:
# Then mark the clicked environment as selected and update the screen.
self.environment = self.payload.environments[row.get_index()]
More information about the anaconda-patches