diff mbox series

[3/3] go-vendor: Minor style tweaks

Message ID 20231106164340.1213043-3-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 1b9cf9cc2a52902e1181d2dac2ba9f2c3172835a
Headers show
Series [1/3] sstate: Ensure sstate searches update file mtime | expand

Commit Message

Richard Purdie Nov. 6, 2023, 4:43 p.m. UTC
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/go-vendor.bbclass | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes/go-vendor.bbclass b/meta/classes/go-vendor.bbclass
index 5b017b0b9da..2426bddfba4 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, \
     return src_uri
 
 python do_vendor_unlink() {
-
-    # We unlink
-
     go_import = d.getVar('GO_IMPORT')
     source_dir = d.getVar('S')
     linkname = os.path.join(source_dir, *['src', go_import, 'vendor'])
@@ -58,9 +55,8 @@  python do_go_vendor() {
 
     src_uri = (d.getVar('SRC_URI') or "").split()
 
-    if len(src_uri) == 0:
-        bb.error("SRC_URI is empty")
-        return
+    if not src_uri:
+        bb.fatal("SRC_URI is empty")
 
     default_destsuffix = "git/src/import/vendor.fetch"
     fetcher = bb.fetch2.Fetch(src_uri, d)