From 7f0751c27eb97fd4e888c6e5b4447af2b12bfbc5 Mon Sep 17 00:00:00 2001 From: Guru Devanla Date: Tue, 15 Jan 2013 16:40:57 -0600 Subject: [PATCH] Update error code for Twitter Rate Limits. This is for Twitter Api 1.1 --- twython/twython.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twython/twython.py b/twython/twython.py index 49c2f65..2e2edb9 100644 --- a/twython/twython.py +++ b/twython/twython.py @@ -203,7 +203,7 @@ class Twython(object): 'error', 'An error occurred processing your request.') self._last_call['api_error'] = error_msg - exceptionType = TwythonRateLimitError if response.status_code == 420 else TwythonError + exceptionType = TwythonRateLimitError if response.status_code == 429 else TwythonError raise exceptionType(error_msg, error_code=response.status_code,