Message ID | cee817c0c3653cc96833815bfe2c87d2d85cc19e.1744750227.git.steve@sakoman.com |
---|---|
State | New |
Headers | show |
Series | [kirkstone,1/4] cve-update-nvd2-native: add workaround for json5 style list | expand |
diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb b/meta/recipes-core/meta/cve-update-nvd2-native.bb index b8faee68d6..9808120cab 100644 --- a/meta/recipes-core/meta/cve-update-nvd2-native.bb +++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb @@ -226,6 +226,11 @@ def update_db_file(db_tmp_file, d, database_time): # We haven't managed to download data return False + # hack for json5 style responses + if raw_data[-3:] == ',]}': + bb.note("Removing trailing ',' from nvd response") + raw_data = raw_data[:-3] + ']}' + data = json.loads(raw_data) index = data["startIndex"]