except OSError:
pass
- cve_f = open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a')
-
bb.utils.mkdirhier(db_dir)
# Connect to database
initialize_db(c)
- with bb.progress.ProgressHandler(d) as ph:
+ with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f:
total_years = date.today().year + 1 - YEAR_START
for i, year in enumerate(range(YEAR_START, date.today().year + 1)):
ph.update((float(i + 1) / total_years) * 100)
if year == date.today().year:
cve_f.write('CVE database update : %s\n\n' % date.today())
- cve_f.close()
conn.commit()
conn.close()
}