diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-02 11:07:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-03 10:12:42 +0000 |
commit | 9abab49f2bcac3ea80f96f837e181904bfae8848 (patch) | |
tree | 863f0a8f90ea0ca21e2f7922704fbaee4c0b9650 /bitbake/bin | |
parent | 5fb6b453f633796f28e230420e17b644adde8b11 (diff) | |
download | poky-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/bin')
-rwxr-xr-x | bitbake/bin/bitbake-diffsigs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/bin/bitbake-diffsigs b/bitbake/bin/bitbake-diffsigs index 6646dccdfa..cf4cc706a2 100755 --- a/bitbake/bin/bitbake-diffsigs +++ b/bitbake/bin/bitbake-diffsigs | |||
@@ -60,7 +60,7 @@ def find_siginfo_task(bbhandler, pn, taskname, sig1=None, sig2=None): | |||
60 | 60 | ||
61 | if sig1 and sig2: | 61 | if sig1 and sig2: |
62 | sigfiles = find_siginfo(bbhandler, pn, taskname, [sig1, sig2]) | 62 | sigfiles = find_siginfo(bbhandler, pn, taskname, [sig1, sig2]) |
63 | if len(sigfiles) == 0: | 63 | if not sigfiles: |
64 | logger.error('No sigdata files found matching %s %s matching either %s or %s' % (pn, taskname, sig1, sig2)) | 64 | logger.error('No sigdata files found matching %s %s matching either %s or %s' % (pn, taskname, sig1, sig2)) |
65 | sys.exit(1) | 65 | sys.exit(1) |
66 | elif not sig1 in sigfiles: | 66 | elif not sig1 in sigfiles: |
@@ -86,7 +86,7 @@ def recursecb(key, hash1, hash2): | |||
86 | hashfiles = find_siginfo(tinfoil, key, None, hashes) | 86 | hashfiles = find_siginfo(tinfoil, key, None, hashes) |
87 | 87 | ||
88 | recout = [] | 88 | recout = [] |
89 | if len(hashfiles) == 0: | 89 | if not hashfiles: |
90 | recout.append("Unable to find matching sigdata for %s with hashes %s or %s" % (key, hash1, hash2)) | 90 | recout.append("Unable to find matching sigdata for %s with hashes %s or %s" % (key, hash1, hash2)) |
91 | elif not hash1 in hashfiles: | 91 | elif not hash1 in hashfiles: |
92 | recout.append("Unable to find matching sigdata for %s with hash %s" % (key, hash1)) | 92 | recout.append("Unable to find matching sigdata for %s with hash %s" % (key, hash1)) |