From 0832af6628ca5ac02d0226899725297dd508470b Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Tue, 18 Dec 2012 23:10:48 +0200 Subject: Issue #16717: get rid of socket.error, replace with OSError --- Lib/xmlrpc/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Lib/xmlrpc/client.py') diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py index d7b2db3725..a2e8e337a7 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: -- cgit v1.2.1