fix: [variodbs] Fixed indentation issue

- if `exploit_results` is empty, we should not go
  any further in the query for next values exploit
  results
pull/590/head
Christian Studer 2022-10-27 09:50:24 +02:00
parent 5526c2c195
commit e18ac776bb
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 9 additions and 9 deletions

View File

@ -191,15 +191,15 @@ def handler(q=False):
if exploit_results:
parser.parse_exploit_information(exploit_results['results'])
empty = False
if exploit_results['next'] is not None:
while(1):
exploit_results = requests.get(exploit_results['next'], headers=headers)
if exploit_results.status_code != 200:
break
exploit_results = exploit_results.json()
parser.parse_exploit_information(exploit_results['results'])
if exploit_results['next'] is None:
break
if exploit_results['next'] is not None:
while(1):
exploit_results = requests.get(exploit_results['next'], headers=headers)
if exploit_results.status_code != 200:
break
exploit_results = exploit_results.json()
parser.parse_exploit_information(exploit_results['results'])
if exploit_results['next'] is None:
break
else:
return {'error': 'Error while querying the variotdbs API.'}
if empty: