summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 21:10:48 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 21:10:48 (GMT)
commit0832af6628ca5ac02d0226899725297dd508470b (patch)
treefc4e7d05d9c6f51eb97f3e8abbcab2b226330b94 /Lib/test/test_logging.py
parentad28c7f9dad791567afa0624acfb3ba430851965 (diff)
downloadcpython-0832af6628ca5ac02d0226899725297dd508470b.zip
cpython-0832af6628ca5ac02d0226899725297dd508470b.tar.gz
cpython-0832af6628ca5ac02d0226899725297dd508470b.tar.bz2
Issue #16717: get rid of socket.error, replace with OSError
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 9b76055..d8ce315 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -569,7 +569,7 @@ class HandlerTest(BaseTest):
self.assertEqual(h.facility, h.LOG_USER)
self.assertTrue(h.unixsocket)
h.close()
- except socket.error: # syslogd might not be available
+ except OSError: # syslogd might not be available
pass
for method in ('GET', 'POST', 'PUT'):
if method == 'PUT':
@@ -679,7 +679,7 @@ if threading:
self.num_bytes = 0
try:
self.peer = conn.getpeername()
- except socket.error as err:
+ except OSError as err:
# a race condition may occur if the other end is closing
# before we can get the peername
self.close()
@@ -880,7 +880,7 @@ if threading:
sock, addr = self.socket.accept()
if self.sslctx:
sock = self.sslctx.wrap_socket(sock, server_side=True)
- except socket.error as e:
+ except OSError as e:
# socket errors are silenced by the caller, print them here
sys.stderr.write("Got an error:\n%s\n" % e)
raise
@@ -946,7 +946,7 @@ if threading:
if data:
try:
super(DelegatingUDPRequestHandler, self).finish()
- except socket.error:
+ except OSError:
if not self.server._closed:
raise