fix bug where link was always expected

This commit is contained in:
Aaron Meihm 2017-01-23 09:50:27 -06:00
Родитель 41cdea6dbe
Коммит 44e8d5d0c1
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -177,7 +177,7 @@ class ScanAPIParser(object):
# if this was an RHSA, and we still have no package details, attempt to add
# it using the enrichment data
if 'RHSA' in newvuln['link'] and len(newvuln['vulnerable_packages']) == 0:
if 'link' in newvuln and 'RHSA' in newvuln['link'] and len(newvuln['vulnerable_packages']) == 0:
m = re.search('(RHSA.+)\.html', newvuln['link'])
if m != None and len(m.groups()) == 1:
i = m.group(1).rindex('-')