Skip to content

Commit

Permalink
Fixed an issue when location response was empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel committed Apr 25, 2019
1 parent a1b37f1 commit a271710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analyzers/TalosReputation/TalosReputation.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def run(self):
if response_details.status_code == 200 | 201:
if response_location.status_code == 200 | 201:
result = response_details.json()
result['country'] = response_location.json()['country']
result['country'] = response_location.json().get('country', None)
self.report(result if len(result) > 0 else {})
else:
self.error('Failed to query Talos location. Status_code {}'.format(response_location.status_code))
Expand Down

0 comments on commit a271710

Please sign in to comment.