second commit
This commit is contained in:
15
env/lib/python3.11/site-packages/ratelimit/exception.py
vendored
Normal file
15
env/lib/python3.11/site-packages/ratelimit/exception.py
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
class RateLimitException(Exception):
|
||||
'''
|
||||
Rate limit exception class.
|
||||
'''
|
||||
def __init__(self, message, period_remaining):
|
||||
'''
|
||||
Custom exception raise when the number of function invocations exceeds
|
||||
that imposed by a rate limit. Additionally the exception is aware of
|
||||
the remaining time period after which the rate limit is reset.
|
||||
|
||||
:param string message: Custom exception message.
|
||||
:param float period_remaining: The time remaining until the rate limit is reset.
|
||||
'''
|
||||
super(RateLimitException, self).__init__(message)
|
||||
self.period_remaining = period_remaining
|
Reference in New Issue
Block a user