Update error code to 429 - (to catch rate limit exceptions) #143

Merged
gdevanla merged 2 commits from update_error_code into master 2013-02-15 08:18:06 -08:00
Showing only changes of commit a28febb0b4 - Show all commits

View file

@ -203,6 +203,7 @@ class Twython(object):
'error', 'An error occurred processing your request.')
self._last_call['api_error'] = error_msg
#Twitter API 1.1 , always return 429 when rate limit is exceeded
exceptionType = TwythonRateLimitError if response.status_code == 429 else TwythonError
raise exceptionType(error_msg,