Skip to content

Commit

Permalink
Fixes #215, check for both versions of the error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
3c7 committed Apr 3, 2018
1 parent 784d567 commit e1631bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions analyzers/HybridAnalysis/HybridAnalysis_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ def run(self):
error = True
while error:
r = requests.get(url, headers=self.headers, auth=HTTPBasicAuth(self.api_key, self.secret), verify=False)
if "error" in r.json().get('response') == "Exceeded maximum API requests per minute(5). Please try again later.":
time.sleep(60)
if "error" in r.json().get('response'):
if "Exceeded maximum API requests per minute(5)" in r.json().get('response').get('error'):
time.sleep(60)
else:
error = False

Expand Down

0 comments on commit e1631bc

Please sign in to comment.