summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-02 11:07:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 10:12:42 +0000
commit9abab49f2bcac3ea80f96f837e181904bfae8848 (patch)
tree863f0a8f90ea0ca21e2f7922704fbaee4c0b9650 /bitbake/lib/bb/fetch2/__init__.py
parent5fb6b453f633796f28e230420e17b644adde8b11 (diff)
downloadpoky-9abab49f2bcac3ea80f96f837e181904bfae8848.tar.gz
bitbake: lib/bb: Clean up use of len()
(Bitbake rev: bbbc843e86639604d00d76b1949b94a78cf1d95d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 000b49a500..1d6e4e0964 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -770,7 +770,7 @@ def get_srcrev(d, method_name='sortable_revision'):
770 if urldata[u].method.supports_srcrev(): 770 if urldata[u].method.supports_srcrev():
771 scms.append(u) 771 scms.append(u)
772 772
773 if len(scms) == 0: 773 if not scms:
774 raise FetchError("SRCREV was used yet no valid SCM was found in SRC_URI") 774 raise FetchError("SRCREV was used yet no valid SCM was found in SRC_URI")
775 775
776 if len(scms) == 1 and len(urldata[scms[0]].names) == 1: 776 if len(scms) == 1 and len(urldata[scms[0]].names) == 1:
@@ -1636,7 +1636,7 @@ class Fetch(object):
1636 if localonly and cache: 1636 if localonly and cache:
1637 raise Exception("bb.fetch2.Fetch.__init__: cannot set cache and localonly at same time") 1637 raise Exception("bb.fetch2.Fetch.__init__: cannot set cache and localonly at same time")
1638 1638
1639 if len(urls) == 0: 1639 if not urls:
1640 urls = d.getVar("SRC_URI").split() 1640 urls = d.getVar("SRC_URI").split()
1641 self.urls = urls 1641 self.urls = urls
1642 self.d = d 1642 self.d = d