[PATCH 2/3] Make sure we can go back to a previous step before doing so (#537889).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 dispatch.py |    3 +++
 text.py     |    7 ++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dispatch.py b/dispatch.py
index 8c86677..e330b35 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -119,6 +119,9 @@ installSteps = [
 class Dispatcher:
 
     def gotoPrev(self):
+        """
+        You should make sure canGoBack() returns True before attempting gotoPrev().
+        """
         self._setDir(DISPATCH_BACK)
 	self.moveStep()
 
diff --git a/text.py b/text.py
index 40093c6..76abc4c 100644
--- a/text.py
+++ b/text.py
@@ -715,14 +715,15 @@ class InstallInterface:
 
 		lastrc = rc
 
-	    if step == -1:
-                if not anaconda.dispatch.canGoBack():
+            if step == -1:
+                if anaconda.dispatch.canGoBack():
+                    anaconda.dispatch.gotoPrev()
+                else:
                     ButtonChoiceWindow(self.screen, _("Cancelled"),
                                        _("I can't go to the previous step "
                                          "from here. You will have to try "
                                          "again."),
                                        buttons=[_("OK")])
-		anaconda.dispatch.gotoPrev()
 	    else:
 		anaconda.dispatch.gotoNext()
 
-- 
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux