Mercurial > farol > farolluz
changeset 45:075519975933
CVE: Handle the case where gsa has no result
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Tue, 30 Dec 2014 12:18:09 +0100 |
parents | b7e64d0a3a7c |
children | 1b7f3f4f1238 |
files | farolluz/parsers/cve.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/farolluz/parsers/cve.py Tue Dec 30 12:17:45 2014 +0100 +++ b/farolluz/parsers/cve.py Tue Dec 30 12:18:09 2014 +0100 @@ -99,7 +99,10 @@ def parse_CVE_from_GSA(data): xml = parseXML(data) - return parse(xml.find('/'.join(['get_info', 'get_info_response', 'info', 'cve', 'raw_data', UN('cve', 'entry')]))) + content = xml.find('/'.join(['get_info', 'get_info_response', 'info', 'cve', 'raw_data', UN('cve', 'entry')])) + if content is None: + return None + return parse(content) def parse(xml): xml = parseXML(xml)