Fix issue #317 TwythonRateLimitError.retry_after is always None. #342

Merged
dalleng merged 2 commits from master into master 2014-10-30 08:11:40 -07:00
Showing only changes of commit f2a535b250 - Show all commits

View file

@ -192,9 +192,10 @@ class Twython(EndpointsMixin, object):
# app keys/user tokens # app keys/user tokens
ExceptionType = TwythonAuthError ExceptionType = TwythonAuthError
raise ExceptionType(error_message, raise ExceptionType(
error_code=response.status_code, error_message,
retry_after=response.headers.get('X-Rate-Limit-Reset')) error_code=response.status_code,
retry_after=response.headers.get('X-Rate-Limit-Reset'))
try: try:
content = response.json() content = response.json()