summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--amqp/transport.py4
-rw-r--r--t/unit/test_transport.py2
2 files changed, 1 insertions, 5 deletions
diff --git a/amqp/transport.py b/amqp/transport.py
index c7d82fc..c873384 100644
--- a/amqp/transport.py
+++ b/amqp/transport.py
@@ -389,10 +389,6 @@ class SSLTransport(_AbstractTransport):
try:
s = recv(n - len(rbuf)) # see note above
except socket.error as exc:
- # ssl.sock.read may cause a SSLerror without errno
- # http://bugs.python.org/issue10272
- if isinstance(exc, SSLError) and 'timed out' in str(exc):
- raise socket.timeout()
# ssl.sock.read may cause ENOENT if the
# operation couldn't be performed (Issue celery#1414).
if exc.errno in _errnos:
diff --git a/t/unit/test_transport.py b/t/unit/test_transport.py
index 7aa703b..09e341c 100644
--- a/t/unit/test_transport.py
+++ b/t/unit/test_transport.py
@@ -672,7 +672,7 @@ class test_SSLTransport:
def test_read_SSLError(self):
self.t.sock = Mock(name='SSLSocket')
self.t._quick_recv = Mock(name='recv', return_value='4')
- self.t._quick_recv.side_effect = transport.SSLError('timed out')
+ self.t._quick_recv.side_effect = socket.timeout()
self.t._read_buffer = MagicMock(return_value='AA')
with pytest.raises(socket.timeout):
self.t._read(64)