Use the write var on return

pull/274/head
9b 2019-02-08 12:29:43 -05:00
parent e4c1468968
commit c8b410161a
1 changed files with 1 additions and 3 deletions

View File

@ -51,15 +51,13 @@ def handler(q=False):
if not checks['success']:
return misperrors
output = {'results': list()}
try:
bs = Backscatter(checks['config']['api_key'])
response = bs.get_observations(query=output['value'], query_type='ip')
if not response['success']:
misperrors['error'] = '%s: %s' % (response['error'], response['message'])
return misperrors
r = {'results': [{'types': mispattributes['output'], 'values': [str(response)]}]}
output = {'results': [{'types': mispattributes['output'], 'values': [str(response)]}]}
except Exception, e:
misperrors['error'] = str(e)
return misperrors