projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
565745f
)
Catch raw socket errors
author
Kenneth Reitz
<me@kennethreitz.com>
Fri, 14 Oct 2011 00:47:58 +0000
(20:47 -0400)
committer
Kenneth Reitz
<me@kennethreitz.com>
Fri, 14 Oct 2011 00:47:58 +0000
(20:47 -0400)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
b3a60c2
..
8d044d5
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-361,6
+361,8
@@
class Request(object):
if hasattr(why, 'reason'):
if isinstance(why.reason, socket.timeout):
why = Timeout(why)
+ elif isinstance(why.reason, socket.error):
+ why = Timeout(why)
self._build_response(why, is_error=True)