[master/f21/rhel7-branch] s390x: show dialog if kernel cmdline in zipl.conf is too long. (#885011)

David Shea dshea at redhat.com
Mon Oct 6 14:21:15 UTC 2014


On 10/06/2014 09:48 AM, Anne Mulhern wrote:
>
> diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py
> index 1541c46..e2da7f1 100644
> --- a/pyanaconda/errors.py
> +++ b/pyanaconda/errors.py
> @@ -49,6 +49,9 @@ class PasswordCryptError(Exception):
>           Exception.__init__(self)
>           self.algo = algo
>   
> +class ZIPLError(Exception):
> +    pass
> +
>   # These constants are returned by the callback in the ErrorHandler class.
>   # Each represents a different kind of action the caller can take:
>   #
> @@ -257,6 +260,15 @@ class ErrorHandler(object):
>           self.ui.showError(message)
>           return ERROR_RAISE
>   
> +    def _ziplErrorHandler(self, *args, **kwargs):
> +        details = kwargs["exception"]
> +        message = _("Installation was stopped due to an error installing the
> "
> +                    "boot loader. The exact error message is:\n\n%s\n\n"
> +                    "The installer will now terminate.") % details
> If showError does not handle translation, then message should get an N_, not just
> an _, I think.
>
>> +
>> +        self.ui.showError(message)
>> +        return ERROR_RAISE
>> +


showError does not handle translations, which is exactly why this needs 
to _ instead of N_. The string is evaluated when the method is called, 
so it will be localized to the current language, and the localized 
string will then be passed to showError which just takes whatever it 
gets and performs no further translation.



More information about the anaconda-patches mailing list