8000 return named error · python-telegram-bot/urllib3@63c8fe9 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 21, 2023. It is now read-only.

Commit 63c8fe9

Browse files
committed
return named error
1 parent 8b2e944 commit 63c8fe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

urllib3/contrib/pyopenssl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
import OpenSSL.SSL
5454
from pyasn1.codec.der import decoder as der_decoder
5555
from pyasn1.type import univ, constraint
56-
from socket import _fileobject, timeout
56+
from socket import _fileobject, timeout, error as SocketError
5757
import ssl
5858
import select
5959

@@ -175,7 +175,7 @@ def recv(self, *args, **kwargs):
175175
if self.suppress_ragged_eofs and e.args == (-1, 'Unexpected EOF'):
176176
return b''
177177
else:
178-
raise
178+
raise SocketError(e)
179179
except OpenSSL.SSL.ZeroReturnError as e:
180180
if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
181181
return b''

0 commit comments

Comments
 (0)
0