Fix issue #317 TwythonRateLimitError.retry_after is always None. #342
1 changed files with 4 additions and 3 deletions
|
|
@ -192,7 +192,8 @@ class Twython(EndpointsMixin, object):
|
||||||
# app keys/user tokens
|
# app keys/user tokens
|
||||||
ExceptionType = TwythonAuthError
|
ExceptionType = TwythonAuthError
|
||||||
|
|
||||||
raise ExceptionType(error_message,
|
raise ExceptionType(
|
||||||
|
error_message,
|
||||||
error_code=response.status_code,
|
error_code=response.status_code,
|
||||||
retry_after=response.headers.get('X-Rate-Limit-Reset'))
|
retry_after=response.headers.get('X-Rate-Limit-Reset'))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue