Re: [master 1/2] text.py: do not traceback when can't go back (#598493).

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/14/2010 05:24 AM, Ales Kozumplik wrote:
> ---
>  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()
>  

Ack

- -- 
Brian C. Lane <bcl@xxxxxxxxxx>
Red Hat / Port Orchard, WA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEVAwUBTD3iUxF+jBaO/jp/AQKDuQf/SolmxgbbziaNpHmN/swKIgt3nfZtnoUO
AKA16lci57PKxjLthoxacW9HX0nMF+b9IojiUtXRyAeJ5wcPJj7Hb68AuZcYRTVq
SWiaq5MUkuiYK8PanZ9ARlWm8IAOmDx0jWiIjVsn/kuwteHssrH5JeGRqHFbLDrJ
pm7Sca5UeutljfBaQHPrhgp7GLNbgk3uZoARp8QZSswGUncaicVlq189hbZIXpNY
PwWnC1romx+GWgLhE5e0tBrbqs7T/zYjAi0FA8OS50tTcWQTctn9TYvAgeE+bg0Q
68o4w27S9ZshcokEHtbT20OGXBnmFfqNx4lul2pRx2MdZdr6p+n3tA==
=NkAt
-----END PGP SIGNATURE-----

_______________________________________________
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