Skip to content

Commit 0bcccc7

Browse files
committed
Print for all rate limit errors
Not just the ones that we're intercepting and converting.
1 parent 4fca600 commit 0bcccc7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/import_backends.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ def submit(self, ticket: Ticket) -> int:
229229
# limit us anyway...
230230

231231
def retry_on_exception(exception: Exception) -> bool:
232-
return isinstance(exception, github.RateLimitExceededException)
232+
if isinstance(exception, github.RateLimitExceededException):
233+
print("... GitHub Rate Limited ...")
234+
return True
235+
return False
233236

234237
@retrying.retry(
235238
retry_on_exception=retry_on_exception,
@@ -251,7 +254,6 @@ def create_issue() -> github.Issue.Issue:
251254
isinstance(message, str)
252255
and RATE_LIMIT_MESSAGE in message
253256
):
254-
print("... GitHub Rate Limited ...")
255257
raise github.RateLimitExceededException(
256258
status=e.status,
257259
data=e.data,

0 commit comments

Comments
 (0)