[initial-setup][master/rhel7-branch][PATCH] Improve log messages for kickstart parsing error
Brian C. Lane
bcl at redhat.com
Tue Oct 13 21:59:06 UTC 2015
On Tue, Oct 13, 2015 at 03:07:10PM +0200, Vratislav Podzimek wrote:
> On Mon, 2015-10-12 at 18:31 +0200, Martin Kolman wrote:
> > Log only the error message from the kickstart parsing error and
> > also add a message clarifying that Initial Setup startup has failed
> > due to invalid kickstart file.
> >
> > Signed-off-by: Martin Kolman <mkolman at redhat.com>
> > ---
> > initial_setup/__main__.py | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/initial_setup/__main__.py b/initial_setup/__main__.py
> > index 7364b9a..1fbff51 100644
> > --- a/initial_setup/__main__.py
> > +++ b/initial_setup/__main__.py
> > @@ -103,7 +103,8 @@ try:
> > parser.readKickstart(kickstart_path)
> > log.info("kickstart parsing done")
> > except pykickstart.errors.KickstartError as kserr:
> > - log.exception("kickstart parsing failed: %s" % kserr)
> > + log.critical("kickstart parsing failed: %s", kserr)
> If this really makes the difference between the full traceback being logged and
> the message, then I'm missing something.
https://docs.python.org/3/library/logging.html?highlight=logging%20exception#logging.exception
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list