diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-06 16:42:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-08 10:56:35 +0000 |
commit | 7e0e0ef0003b86a3c49965bc775c447b186ca90e (patch) | |
tree | da4b70412bc4f7b0c9b754601d81fc3b35275202 /meta/classes | |
parent | d90fb73db5b07a1f407d59e698c5114d342e2322 (diff) | |
download | poky-7e0e0ef0003b86a3c49965bc775c447b186ca90e.tar.gz |
go-vendor: Minor style tweaks
Drop a len() usage that isn't needed, drop a comment that isn't needed
and use bb.fatal() to end the task with an error.
(From OE-Core rev: 1b9cf9cc2a52902e1181d2dac2ba9f2c3172835a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/go-vendor.bbclass | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/meta/classes/go-vendor.bbclass b/meta/classes/go-vendor.bbclass index 5b017b0b9d..2426bddfba 100644 --- a/meta/classes/go-vendor.bbclass +++ b/meta/classes/go-vendor.bbclass | |||
@@ -41,9 +41,6 @@ def go_src_uri(repo, version, path=None, subdir=None, \ | |||
41 | return src_uri | 41 | return src_uri |
42 | 42 | ||
43 | python do_vendor_unlink() { | 43 | python do_vendor_unlink() { |
44 | |||
45 | # We unlink | ||
46 | |||
47 | go_import = d.getVar('GO_IMPORT') | 44 | go_import = d.getVar('GO_IMPORT') |
48 | source_dir = d.getVar('S') | 45 | source_dir = d.getVar('S') |
49 | linkname = os.path.join(source_dir, *['src', go_import, 'vendor']) | 46 | linkname = os.path.join(source_dir, *['src', go_import, 'vendor']) |
@@ -58,9 +55,8 @@ python do_go_vendor() { | |||
58 | 55 | ||
59 | src_uri = (d.getVar('SRC_URI') or "").split() | 56 | src_uri = (d.getVar('SRC_URI') or "").split() |
60 | 57 | ||
61 | if len(src_uri) == 0: | 58 | if not src_uri: |
62 | bb.error("SRC_URI is empty") | 59 | bb.fatal("SRC_URI is empty") |
63 | return | ||
64 | 60 | ||
65 | default_destsuffix = "git/src/import/vendor.fetch" | 61 | default_destsuffix = "git/src/import/vendor.fetch" |
66 | fetcher = bb.fetch2.Fetch(src_uri, d) | 62 | fetcher = bb.fetch2.Fetch(src_uri, d) |