From d10c1e02594f42e969438ca917937e8f59093fc5 Mon Sep 17 00:00:00 2001 From: Bjoern Tropf Date: Wed, 18 Nov 2009 11:23:23 +0100 Subject: Fix an inline TODO Fix typo --- tools/cron.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/cron.py b/tools/cron.py index 9c44de1..ecea3de 100755 --- a/tools/cron.py +++ b/tools/cron.py @@ -92,8 +92,8 @@ def main(argv): if current_year < CONST['minyear'] or current_year > CONST['maxyear']: current_year = CONST['maxyear'] - for directory in PARAM: - if 'dir' in directory and not os.path.isdir(PARAM[directory]): + for directory in ['tmpdir', 'bugdir', 'nvddir', 'outdir']: + if not os.path.isdir(PARAM[directory]): os.makedirs(PARAM[directory]) logging.info('Receiving the latest xml file from the nvd') @@ -144,7 +144,8 @@ def main(argv): for cve in vul['cvelist']: if cve == NOCVE['cve']: vul['cves'] = [NOCVE['cve']] - break #TODO Raise exception instead of break + if len(vul['cvelist']) > 1: + raise CronError('\'Nocve\' and valid cve: ' + item) else: try: vul['cves'].append(nvd_dict[cve]) @@ -361,7 +362,7 @@ def interval_from_wb(whiteboard): def write_xml_file(directory, vul): - 'Write a bug file containing all important information for kernel-check' + 'Writes a bug file containing all important information for kernel-check' filename = os.path.join(directory, vul['bugid'] + '.xml') -- cgit v1.2.3-65-gdbad