summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/meta/cve-update-db-native.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/meta/cve-update-db-native.bb')
-rw-r--r--meta/recipes-core/meta/cve-update-db-native.bb8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
index 575254af40..95a0dfcc90 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() {
59 json_url = year_url + ".json.gz" 59 json_url = year_url + ".json.gz"
60 60
61 # Retrieve meta last modified date 61 # Retrieve meta last modified date
62 response = urllib.request.urlopen(meta_url) 62 try:
63 response = urllib.request.urlopen(meta_url)
64 except urllib.error.URLError as e:
65 cve_f.write('Warning: CVE db update error, Unable to fetch CVE data.\n\n')
66 bb.warn("Failed to fetch CVE data (%s)" % e.reason)
67 return
68
63 if response: 69 if response:
64 for l in response.read().decode("utf-8").splitlines(): 70 for l in response.read().decode("utf-8").splitlines():
65 key, value = l.split(":", 1) 71 key, value = l.split(":", 1)