From: Olof Johansson <olof.johansson@axis.com>
To: Randy Witt <randy.e.witt@linux.intel.com>,
<bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH] bitbake:main.py: Handle RuntimeError exception in list_extension_modules
Date: Fri, 21 Aug 2015 00:51:44 +0200 [thread overview]
Message-ID: <20150820225144.GB12937@axis.com> (raw)
In-Reply-To: <1440104436-12491-1-git-send-email-randy.e.witt@linux.intel.com>
On 15-08-20 23:00 +0200, Randy Witt wrote:
> --- a/bitbake/lib/bb/main.py
> +++ b/bitbake/lib/bb/main.py
> @@ -60,7 +60,7 @@ def list_extension_modules(pkg, checkattr):
> continue
> try:
> module = __import__(pkg.__name__, fromlist=[modulename])
> - except (ImportError, SystemExit):
> + except (ImportError, SystemExit, RuntimeError):
> # If we can't import it, it's not valid
> continue
> module_if = getattr(module, modulename)
Wouldn't it be better to just skip naming the exceptions you want
to catch in this case? I.e.:
try:
module = __import__(...
except:
continue
"If we can't import it" ...
--
olofjn
next prev parent reply other threads:[~2015-08-20 22:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 21:00 [PATCH] bitbake:main.py: Handle RuntimeError exception in list_extension_modules Randy Witt
2015-08-20 22:51 ` Olof Johansson [this message]
2015-08-21 8:07 ` Paul Eggleton
2015-08-21 16:53 ` Richard Purdie
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=20150820225144.GB12937@axis.com \
--to=olof.johansson@axis.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=randy.e.witt@linux.intel.com \
/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.