summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/meta/cve-update-db-native.bb5
1 files changed, 1 insertions, 4 deletions
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
index d22b66f..328f6ab 100644
--- a/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/meta/recipes-core/meta/cve-update-db-native.bb
@@ -50,8 +50,6 @@ python do_populate_cve_db() {
50 except OSError: 50 except OSError:
51 pass 51 pass
52 52
53 cve_f = open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a')
54
55 bb.utils.mkdirhier(db_dir) 53 bb.utils.mkdirhier(db_dir)
56 54
57 # Connect to database 55 # Connect to database
@@ -60,7 +58,7 @@ python do_populate_cve_db() {
60 58
61 initialize_db(c) 59 initialize_db(c)
62 60
63 with bb.progress.ProgressHandler(d) as ph: 61 with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f:
64 total_years = date.today().year + 1 - YEAR_START 62 total_years = date.today().year + 1 - YEAR_START
65 for i, year in enumerate(range(YEAR_START, date.today().year + 1)): 63 for i, year in enumerate(range(YEAR_START, date.today().year + 1)):
66 ph.update((float(i + 1) / total_years) * 100) 64 ph.update((float(i + 1) / total_years) * 100)
@@ -108,7 +106,6 @@ python do_populate_cve_db() {
108 if year == date.today().year: 106 if year == date.today().year:
109 cve_f.write('CVE database update : %s\n\n' % date.today()) 107 cve_f.write('CVE database update : %s\n\n' % date.today())
110 108
111 cve_f.close()
112 conn.commit() 109 conn.commit()
113 conn.close() 110 conn.close()
114} 111}