diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 21:10:48 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 21:10:48 (GMT) |
commit | 0832af6628ca5ac02d0226899725297dd508470b (patch) | |
tree | fc4e7d05d9c6f51eb97f3e8abbcab2b226330b94 /Lib/xmlrpc | |
parent | ad28c7f9dad791567afa0624acfb3ba430851965 (diff) | |
download | cpython-0832af6628ca5ac02d0226899725297dd508470b.zip cpython-0832af6628ca5ac02d0226899725297dd508470b.tar.gz cpython-0832af6628ca5ac02d0226899725297dd508470b.tar.bz2 |
Issue #16717: get rid of socket.error, replace with OSError
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r-- | Lib/xmlrpc/client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py index d7b2db3..a2e8e33 100644 --- a/Lib/xmlrpc/client.py +++ b/Lib/xmlrpc/client.py @@ -1130,8 +1130,9 @@ class Transport: for i in (0, 1): try: return self.single_request(host, handler, request_body, verbose) - except socket.error as e: - if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): + except OSError as e: + if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED, + errno.EPIPE): raise except http.client.BadStatusLine: #close after we sent request if i: |