From: Peter Korsgaard <peter@korsgaard.com>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/2] utils/genrandconfig: dump traceback for unhandled exceptions
Date: Sat, 17 Sep 2022 13:06:08 +0200 [thread overview]
Message-ID: <87pmfu2rbz.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <e8e8f938d57fc7afb0e6e4a6a971eca7896b7387.1661071280.git.yann.morin.1998@free.fr> (Yann E. MORIN's message of "Sun, 21 Aug 2022 10:41:28 +0200")
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> In case of an unexpected error, we currently only print the exception as
> an str(). For example, the recent issue with the glibc version check
> only reported:
> TypeError: cannot use a string pattern on a bytes-like object
> That does not help in fixing the issue; the exception text is also not
> usually very user-friendly either anyway.
> We change the reporting to print the traceback, which in the glibc
> version check mentioned above, the error is reported as:
> Traceback (most recent call last):
> File "./utils/genrandconfig", line 740, in <module>
> ret = gen_config(args)
> File "./utils/genrandconfig", line 676, in gen_config
> if not is_toolchain_usable(configfile, toolchainconfig):
> File "./utils/genrandconfig", line 186, in is_toolchain_usable
> if StrictVersion('2.14') > StrictVersion(glibc_version):
> File "/usr/lib/python3.8/distutils/version.py", line 40, in __init__
> self.parse(vstring)
> File "/usr/lib/python3.8/distutils/version.py", line 135, in parse
> match = self.version_re.match(vstring)
> TypeError: cannot use a string pattern on a bytes-like object
> With this, the error is much easier to pinpoint (it's the last one that
> is not in a system module).
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Committed to 2022.05.x and 2022.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-09-17 11:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-21 8:41 [Buildroot] [PATCH 0/2] utils/genrandconfig: fix host-glibc version check (branch yem/gerandconfig-fixups) Yann E. MORIN
2022-08-21 8:41 ` [Buildroot] [PATCH 1/2] utils/genrandconfig: fix checking host glibc version Yann E. MORIN
2022-09-17 11:06 ` Peter Korsgaard
2022-08-21 8:41 ` [Buildroot] [PATCH 2/2] utils/genrandconfig: dump traceback for unhandled exceptions Yann E. MORIN
2022-09-17 11:06 ` Peter Korsgaard [this message]
2022-08-23 20:20 ` [Buildroot] [PATCH 0/2] utils/genrandconfig: fix host-glibc version check (branch yem/gerandconfig-fixups) Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmfu2rbz.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@buildroot.org \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.