[master 1/1] Fix first run environment setup in software spoke

jkonecny12 installerbot-noreply at redhat.com
Tue Aug 25 12:00:01 UTC 2015


From: Jiri Konecny <jkonecny at redhat.com>

Without this change the anaconda will raise exception NoSuchGroup for
environment None.

Thank you for helping me to find this mkolman.
---
 pyanaconda/ui/gui/spokes/software.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 9b50a98..1989875 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -396,7 +396,11 @@ def refresh(self):
             elif firstEnvironment:  # manual installation
                 # for manual installs that don't have a default provided by the install class
                 # just tick the first radio button and select the first environment
-                if not self.environment_valid:
+                #
+                # None indicates that an environment has not been set, which is a valid
+                # value of the environment variable.
+                # Only non existing environments are evaluate as invalid
+                if not self.environment_valid or self.environment is None:
                     radio.set_active(True)
                     self.environment = environmentid
                 firstEnvironment = False


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/5c83832588bd67c77fd5805b6f33d45b88e9ff23


More information about the anaconda-patches mailing list