summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Tropf <asym@gentoo.org>2009-11-18 11:23:23 +0100
committerBjoern Tropf <asym@gentoo.org>2009-11-18 11:23:23 +0100
commitd10c1e02594f42e969438ca917937e8f59093fc5 (patch)
treea5f03040c91476006a6f00723b20310e323f28cc
parentRefactoring all parameters in cron.py (diff)
downloadkernel-check-d10c1e02594f42e969438ca917937e8f59093fc5.tar.gz
kernel-check-d10c1e02594f42e969438ca917937e8f59093fc5.tar.bz2
kernel-check-d10c1e02594f42e969438ca917937e8f59093fc5.zip
Fix an inline TODO
Fix typo
-rwxr-xr-xtools/cron.py9
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')