diff options
author | 2009-11-18 11:23:23 +0100 | |
---|---|---|
committer | 2009-11-18 11:23:23 +0100 | |
commit | d10c1e02594f42e969438ca917937e8f59093fc5 (patch) | |
tree | a5f03040c91476006a6f00723b20310e323f28cc | |
parent | Refactoring all parameters in cron.py (diff) | |
download | kernel-check-d10c1e02594f42e969438ca917937e8f59093fc5.tar.gz kernel-check-d10c1e02594f42e969438ca917937e8f59093fc5.tar.bz2 kernel-check-d10c1e02594f42e969438ca917937e8f59093fc5.zip |
Fix an inline TODO
Fix typo
-rwxr-xr-x | tools/cron.py | 9 |
1 files 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') |