Skip to content

Commit e391492

Browse files
authored
fix: Fix remaining variable definition. (#696)
* fix: Fix remaining variable definition. * refactor: Recompress logic conditions to utilise and instead of multiline if condition
1 parent b477c95 commit e391492

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions/api/http/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ async def request(self, route: Route, **kwargs) -> Optional[Any]:
183183
self._loop.call_later(
184184
self._global_lock.reset_after, self._global_lock.lock.release
185185
)
186-
elif int(remaining) == 0:
186+
if remaining is not None and int(remaining) == 0:
187187
log.warning(
188188
f"The HTTP client has exhausted a per-route ratelimit. Locking route for {reset_after} seconds."
189189
)

0 commit comments

Comments
 (0)