From: Lee Chee Yang <chee.yang....@intel.com> prevent cve-check from fatal error cause by network issue.
[YOCTO #13680] Signed-off-by: Lee Chee Yang <chee.yang....@intel.com> --- meta/recipes-core/meta/cve-update-db-native.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb index 575254a..95a0dfc 100644 --- a/meta/recipes-core/meta/cve-update-db-native.bb +++ b/meta/recipes-core/meta/cve-update-db-native.bb @@ -59,7 +59,13 @@ python do_populate_cve_db() { json_url = year_url + ".json.gz" # Retrieve meta last modified date - response = urllib.request.urlopen(meta_url) + try: + response = urllib.request.urlopen(meta_url) + except urllib.error.URLError as e: + cve_f.write('Warning: CVE db update error, Unable to fetch CVE data.\n\n') + bb.warn("Failed to fetch CVE data (%s)" % e.reason) + return + if response: for l in response.read().decode("utf-8").splitlines(): key, value = l.split(":", 1) -- 2.7.4
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#136691): https://lists.openembedded.org/g/openembedded-core/message/136691 Mute This Topic: https://lists.openembedded.org/mt/72538430/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-