summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@kernel.crashing.org>2022-10-06 16:54:07 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-25 13:42:00 +0100
commit2bbabed51e3aca138486d3feef640f5d3249be40 (patch)
treedb4453d89634b9b7e645ec19ceda121d731ec306 /meta/classes-global
parentdafd2631a20ffd94e6f21c46938a010e92b57da4 (diff)
downloadopenembedded-core-2bbabed51e3aca138486d3feef640f5d3249be40.tar.gz
insane.bbclass: Allow hashlib version that only accepts on parameter
Some versions of hashlib don't appear to implement the second FIPS related argument. Detect this and support both versions. Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r--meta/classes-global/insane.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index db34b4bdb5..dc46857a19 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -555,7 +555,10 @@ python populate_lic_qa_checksum() {
import hashlib
lineno = 0
license = []
- m = hashlib.new('MD5', usedforsecurity=False)
+ try:
+ m = hashlib.new('MD5', usedforsecurity=False)
+ except TypeError:
+ m = hashlib.new('MD5')
for line in f:
lineno += 1
if (lineno >= beginline):