[master 1/3] Only use the instclass environment if it actually exists.
dashea
installerbot-noreply at redhat.com
Wed Mar 25 21:39:11 UTC 2015
From: David Shea <dshea at redhat.com>
It's possible to, for example, boot a Fedora-Server ISO and point it to
a Workstation repo. Don't crash if someone does this.
---
pyanaconda/ui/gui/spokes/software.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index e9943cf..becae12 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -286,7 +286,8 @@ def refresh(self):
# If no environment is selected, use the default from the instclass.
# If nothing is set in the instclass, the first environment will be
# selected below.
- if not self.environment and self.payload.instclass:
+ if not self.environment and self.payload.instclass and \
+ self.payload.instclass.defaultPackageEnvironment in self.payload.environments:
self.environment = self.payload.instclass.defaultPackageEnvironment
firstEnvironment = True
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/bed505acee9b4308cd6277ff1dd154bed019bc5b
More information about the anaconda-patches
mailing list