Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeouts throw exception from urllib2 #52

Closed
toastdriven opened this issue May 30, 2011 · 1 comment
Closed

Timeouts throw exception from urllib2 #52

toastdriven opened this issue May 30, 2011 · 1 comment

Comments

@toastdriven
Copy link
Contributor

Slight grump. When I set a timeout (say requests.get('some url', timeout=1.0)), if the server on the other end doesn't reply in time, I get a urllib2.URLError thrown. Yay that it timed out right, but in order to catch the exception, I have to import urllib2 as well. Any chance there could be a requests exception thrown there instead?

@kennethreitz
Copy link
Contributor

Luckily, the latest release raises a requests.exceptions.Timeout exception :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants