diff options
author | 2009-12-07 19:23:59 +0100 | |
---|---|---|
committer | 2009-12-07 19:23:59 +0100 | |
commit | 26eea43be3133628f17cb332f481b6dae10dd2be (patch) | |
tree | 77bb0e16695283e2bc039891749bb56b27f7f0c7 | |
parent | kernel-check 0.3.15 (diff) | |
download | kernel-check-26eea43be3133628f17cb332f481b6dae10dd2be.tar.gz kernel-check-26eea43be3133628f17cb332f481b6dae10dd2be.tar.bz2 kernel-check-26eea43be3133628f17cb332f481b6dae10dd2be.zip |
Fix two minor bugs
-rw-r--r-- | pym/kernelcheck/lib/kernellib.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/kernelcheck/lib/kernellib.py b/pym/kernelcheck/lib/kernellib.py index 4482429..2dcd8cd 100644 --- a/pym/kernelcheck/lib/kernellib.py +++ b/pym/kernelcheck/lib/kernellib.py @@ -3,6 +3,7 @@ # Copyright 2009-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +import inspect import mmap import os import portage @@ -402,7 +403,7 @@ def parse_cve_files(directory): if (os.path.exists(directory)): for item in os.listdir(directory): try: - cve_file = read_cve_file(directory, item[:-4]) + cve_file = read_cve_file(directory, item) if cve_file is not None: files.append(cve_file) @@ -543,14 +544,14 @@ def read_cve_file(directory, bugid): cves = list() affected = list() - filename = os.path.join(directory, bugid + '.xml') + filename = os.path.join(directory, '%s.xml' % bugid[:-4]) try: with open(filename, 'r+') as xml_data: memory_map = mmap.mmap(xml_data.fileno(), 0) root = xml.etree.cElementTree.parse(memory_map).getroot() except IOError, e: - BUG_ON(filename, e) + BUG_ON(bugid, e) return None bugroot = root.find('bug') |