[master 1/1] don't crash if no environment set in interactive (#1257036)

AdamWill installerbot-noreply at redhat.com
Wed Aug 26 07:09:32 UTC 2015


From: Adam Williamson <awilliam at redhat.com>

634d2d9 fixed the kickstart case but broke the interactive
'nothing selected' case. Since we want to return "Nothing
selected" for None regardless of whether we're kickstarted or
interactive, just move the 'if not self.environment' check
out of the 'if flags.automatedInstall' block so it applies to
both.
---
 pyanaconda/ui/gui/spokes/software.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 9b50a98..c08eee4 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -293,6 +293,9 @@ def status(self):
         if not self.txid_valid:
             return _("Source changed - please verify")
 
+        if not self.environment:
+            return _("Nothing selected")
+
         # kickstart installation
         if flags.automatedInstall:
             if self.data.packages.seen:
@@ -303,8 +306,6 @@ def status(self):
                 elif not self.environment_valid:
                     return _("Invalid environment specified in kickstart")
             # we have no packages section in the kickstart and no environment has been set
-            elif not self.environment:
-                return _("Nothing selected")
 
         if not flags.automatedInstall and not self.environment_valid:
             # selected environment is not valid, this can happen when a valid environment


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


More information about the anaconda-patches mailing list