Adds retry_after attribute to TwythonRateLimitError #304

Merged
corydolphin merged 1 commit from master into master 2014-01-13 10:37:17 -08:00
corydolphin commented 2014-01-12 15:28:42 -08:00 (Migrated from github.com)

It is awesome that RateLimitErrors are bubble'd up through this library, great work! Do you believe it would be useful to expose the retry_after value in the TwythonRateLimitError raised?

In using twython, I found myself wishing I could retrieve this value in the exception, so I created this quick patch. Please give me feedback or feel free to ignore this, if you do not believe it is useful for others :-)

Thanks,
Cory

P.S. I was not able to run the test suite, as I do not have all of the necessary config vars set, testing it locally, it seemed to work okay. (Famous last words)

It is **awesome** that RateLimitErrors are bubble'd up through this library, great work! Do you believe it would be useful to expose the retry_after value in the `TwythonRateLimitError` raised? In using twython, I found myself wishing I could retrieve this value in the exception, so I created this quick patch. Please give me feedback or feel free to ignore this, if you do not believe it is useful for others :-) Thanks, Cory P.S. I was not able to run the test suite, as I do not have all of the necessary config vars set, testing it locally, it seemed to work okay. (Famous last words)
michaelhelmick commented 2014-01-12 15:56:43 -08:00 (Migrated from github.com)

I'll check this out tomorrow! Sounds like a good idea!—
Sent from Mailbox for iPhone

On Sun, Jan 12, 2014 at 6:28 PM, Cory Dolphin notifications@github.com
wrote:

It is awesome that RateLimitErrors are bubble'd up through this library, great work! Do you believe it would be useful to expose the retry_after value in the TwythonRateLimitError raised?
In using twython, I found myself wishing I could retrieve this value in the exception, so I created this quick patch. Please give me feedback or feel free to ignore this, if you do not believe it is useful for others :-)
Thanks,
Cory
P.S. I was not able to run the test suite, as I do not have all of the necessary config vars set, testing it locally, it seemed to work okay. (Famous last words)
You can merge this Pull Request by running:
git pull https://github.com/wcdolphin/twython master
Or you can view, comment on it, or merge it online at:
https://github.com/ryanmcgrath/twython/pull/304
-- Commit Summary --

I'll check this out tomorrow! Sounds like a good idea!— Sent from Mailbox for iPhone On Sun, Jan 12, 2014 at 6:28 PM, Cory Dolphin notifications@github.com wrote: > It is **awesome** that RateLimitErrors are bubble'd up through this library, great work! Do you believe it would be useful to expose the retry_after value in the `TwythonRateLimitError` raised? > In using twython, I found myself wishing I could retrieve this value in the exception, so I created this quick patch. Please give me feedback or feel free to ignore this, if you do not believe it is useful for others :-) > Thanks, > Cory > P.S. I was not able to run the test suite, as I do not have all of the necessary config vars set, testing it locally, it seemed to work okay. (Famous last words) > You can merge this Pull Request by running: > git pull https://github.com/wcdolphin/twython master > Or you can view, comment on it, or merge it online at: > https://github.com/ryanmcgrath/twython/pull/304 > -- Commit Summary -- > - Adds retry_after attribute to TwythonRateLimitError > -- File Changes -- > M twython/exceptions.py (2) > -- Patch Links -- > https://github.com/ryanmcgrath/twython/pull/304.patch > https://github.com/ryanmcgrath/twython/pull/304.diff > --- > Reply to this email directly or view it on GitHub: > https://github.com/ryanmcgrath/twython/pull/304
michaelhelmick commented 2014-01-13 10:37:14 -08:00 (Migrated from github.com)

You can always update the config.py file in tests with you credentials. But we're in the midst of rewriting tests anyways, so I'll let it slide. Thanks for the contribution!

You can always update the `config.py` file in `tests` with you credentials. But we're in the midst of rewriting tests anyways, so I'll let it slide. Thanks for the contribution!
corydolphin commented 2014-01-13 18:57:30 -08:00 (Migrated from github.com)

👍 thanks

:+1: thanks
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: code/twython#304
No description provided.