mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
classes/lib: Remove bb.build.FuncFailed
Whilst seemingly a good idea, this exception doesn't really serve any purpose that bb.fatal() doesn't cover. Wrapping exceptions within exceptions isn't pythonic. Its not used in many places, lets clean up those and remove usage of it entirely. It may ultimately be dropped form bitbake entirely. (From OE-Core rev: efe87ce4b2154c6f1c591ed9d8f770c229b044ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+7
-11
@@ -71,17 +71,13 @@ python go_do_unpack() {
|
||||
if len(src_uri) == 0:
|
||||
return
|
||||
|
||||
try:
|
||||
fetcher = bb.fetch2.Fetch(src_uri, d)
|
||||
for url in fetcher.urls:
|
||||
if fetcher.ud[url].type == 'git':
|
||||
if fetcher.ud[url].parm.get('destsuffix') is None:
|
||||
s_dirname = os.path.basename(d.getVar('S'))
|
||||
fetcher.ud[url].parm['destsuffix'] = os.path.join(s_dirname, 'src',
|
||||
d.getVar('GO_IMPORT')) + '/'
|
||||
fetcher.unpack(d.getVar('WORKDIR'))
|
||||
except bb.fetch2.BBFetchException as e:
|
||||
raise bb.build.FuncFailed(e)
|
||||
fetcher = bb.fetch2.Fetch(src_uri, d)
|
||||
for url in fetcher.urls:
|
||||
if fetcher.ud[url].type == 'git':
|
||||
if fetcher.ud[url].parm.get('destsuffix') is None:
|
||||
s_dirname = os.path.basename(d.getVar('S'))
|
||||
fetcher.ud[url].parm['destsuffix'] = os.path.join(s_dirname, 'src', d.getVar('GO_IMPORT')) + '/'
|
||||
fetcher.unpack(d.getVar('WORKDIR'))
|
||||
}
|
||||
|
||||
go_list_packages() {
|
||||
|
||||
Reference in New Issue
Block a user