Skip to content

Commit

Permalink
Print for all rate limit errors
Browse files Browse the repository at this point in the history
Not just the ones that we're intercepting and converting.
  • Loading branch information
PeterJCLaw committed Jan 27, 2022
1 parent cdd35b1 commit 2a1ffe7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/import_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ def submit(self, ticket: Ticket) -> int:
# limit us anyway...

def retry_on_exception(exception: Exception) -> bool:
return isinstance(exception, github.RateLimitExceededException)
if isinstance(exception, github.RateLimitExceededException):
print("... GitHub Rate Limited ...")
return True
return False

@retrying.retry(
retry_on_exception=retry_on_exception,
Expand All @@ -251,7 +254,6 @@ def create_issue() -> github.Issue.Issue:
isinstance(message, str)
and RATE_LIMIT_MESSAGE in message
):
print("... GitHub Rate Limited ...")
raise github.RateLimitExceededException(
status=e.status,
data=e.data,
Expand Down

0 comments on commit 2a1ffe7

Please sign in to comment.