[anaconda][rhel7-branch/master][PATCH] Don't crash if escrow certificate is requested without network access (#1085265)
Anne Mulhern
amulhern at redhat.com
Fri Sep 26 15:36:28 UTC 2014
----- Original Message -----
> From: "Martin Kolman" <mkolman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, September 26, 2014 10:36:43 AM
> Subject: [anaconda][rhel7-branch/master][PATCH] Don't crash if escrow certificate is requested without network access
> (#1085265)
>
> Turn the KickstartError to KickstartValueError. The KickstartValueError
> is caught when the Storage spoke executes kickstart storage and user
> can inspect the error in the Storage spoke info bar and fix it.
>
> Also improve the error message a bit.
>
> Resolves: rhbz#1085265
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
> pyanaconda/kickstart.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> index 7d25840..9f93ce9 100644
> --- a/pyanaconda/kickstart.py
> +++ b/pyanaconda/kickstart.py
> @@ -153,8 +153,8 @@ def getEscrowCertificate(escrowCerts, url):
>
> needs_net = not url.startswith("/") and not url.startswith("file:")
> if needs_net and not nm.nm_is_connected():
> - msg = _("Escrow certificate %s requires the network.") % url
> - raise KickstartError(msg)
> + msg = _("Escrow certificate %s requires network access.") % url
> + raise KickstartValueError(msg)
>
> log.info("escrow: downloading %s", url)
>
> --
> 1.9.3
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
There's nothing wrong with the value, it's the context, so KickstartError
is the most appropriate to raise.
Maybe _doExecute() in GUI and TUI should be catching KickstartError,
not KickstartValueError.
- mulhern
More information about the anaconda-patches
mailing list