FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 07-14-2010, 12:24 PM
Ales Kozumplik
 
Default text.py: do not traceback when can't go back (#598493).

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

diff --git a/pyanaconda/dispatch.py b/pyanaconda/dispatch.py
index a5e06a9..39aa2d9 100644
--- a/pyanaconda/dispatch.py
+++ b/pyanaconda/dispatch.py
@@ -120,6 +120,9 @@ installSteps = [
class Dispatcher(object):

def gotoPrev(self):
+ """
+ You should make sure canGoBack() returns True before attempting gotoPrev().
+ """
self._setDir(DISPATCH_BACK)
self.moveStep()

diff --git a/pyanaconda/text.py b/pyanaconda/text.py
index 0c48407..4dc0d18 100644
--- a/pyanaconda/text.py
+++ b/pyanaconda/text.py
@@ -537,14 +537,15 @@ class InstallInterface(InstallInterfaceBase):

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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org