This commit is contained in:
Kenneth Reitz
2011-06-15 22:56:14 -04:00
parent cb0a96fbf3
commit 245c6edec3
+3
View File
@@ -262,6 +262,9 @@ class Request(object):
self._build_response(why)
if not self.redirect:
self.response.error = why
# TODO: Support urllib connection refused errors
except urllib2.URLError, error:
raise Timeout if isinstance(error.reason, socket.timeout) else error
else: