summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorYuta Hayama <hayama@lineo.co.jp>2023-07-27 17:56:26 +0900
committerSteve Sakoman <steve@sakoman.com>2023-08-16 03:55:13 -1000
commit959e7b1432994ade7a79b074d8de3070a69c494f (patch)
tree800f4fb78db133f742e5ac52c91521fb1ec1f09a /meta/recipes-core
parent729e5e306f02535df51dc394cd45f7a7c4d16cf4 (diff)
downloadpoky-959e7b1432994ade7a79b074d8de3070a69c494f.tar.gz
cve-update-nvd2-native: always pass str for json.loads()
Currently json.loads() accepts one of the types str, bytes, or bytearray as an argument, but bytes and bytearrays have only been allowed since python 3.6. The version of Python3 provided by default on Ubuntu 16.04 and Debian 9.x is 3.5, so make raw_data type str to work correctly on these build hosts. (From OE-Core rev: 4efdf7a93254056b9ac47de470740ac113b031f2) Signed-off-by: Yuta Hayama <hayama@lineo.co.jp> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/meta/cve-update-nvd2-native.bb2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb b/meta/recipes-core/meta/cve-update-nvd2-native.bb
index 2f7dad7e82..67d76f75dd 100644
--- a/meta/recipes-core/meta/cve-update-nvd2-native.bb
+++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb
@@ -136,7 +136,7 @@ def nvd_request_next(url, api_key, args):
136 136
137 if (r.headers['content-encoding'] == 'gzip'): 137 if (r.headers['content-encoding'] == 'gzip'):
138 buf = r.read() 138 buf = r.read()
139 raw_data = gzip.decompress(buf) 139 raw_data = gzip.decompress(buf).decode("utf-8")
140 else: 140 else:
141 raw_data = r.read().decode("utf-8") 141 raw_data = r.read().decode("utf-8")
142 142