|
@@ -63,14 +63,15 @@ python cve_save_summary_handler () {
|
|
|
timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
|
|
|
cve_summary_file = os.path.join(cvelogpath, "%s-%s.txt" % (cve_summary_name, timestamp))
|
|
|
|
|
|
- shutil.copyfile(cve_tmp_file, cve_summary_file)
|
|
|
+ if os.path.exists(cve_tmp_file):
|
|
|
+ shutil.copyfile(cve_tmp_file, cve_summary_file)
|
|
|
|
|
|
- if cve_summary_file and os.path.exists(cve_summary_file):
|
|
|
- cvefile_link = os.path.join(cvelogpath, cve_summary_name)
|
|
|
+ if cve_summary_file and os.path.exists(cve_summary_file):
|
|
|
+ cvefile_link = os.path.join(cvelogpath, cve_summary_name)
|
|
|
|
|
|
- if os.path.exists(os.path.realpath(cvefile_link)):
|
|
|
- os.remove(cvefile_link)
|
|
|
- os.symlink(os.path.basename(cve_summary_file), cvefile_link)
|
|
|
+ if os.path.exists(os.path.realpath(cvefile_link)):
|
|
|
+ os.remove(cvefile_link)
|
|
|
+ os.symlink(os.path.basename(cve_summary_file), cvefile_link)
|
|
|
}
|
|
|
|
|
|
addhandler cve_save_summary_handler
|