-
Notifications
You must be signed in to change notification settings - Fork 13
SSLError has no attribute 'reason' #5
Description
I ran across this error when the connection was timing out:
File "C:\Python27\lib\site-packages\deluge_client\client.py", line 52, in connect if e.reason != 'UNSUPPORTED_PROTOCOL' or not hasattr(ssl, 'PROTOCOL_SSLv3'): AttributeError: 'SSLError' object has no attribute 'reason'
added to line 52 a check for the reason attribute solves the surface issue.
if not hasattr(e, 'reason') or e.reason != 'UNSUPPORTED_PROTOCOL' or not hasattr(ssl, 'PROTOCOL_SSLv3'):
The underlying issue is my connection to deluge timing out, that's not something wrong with this project, but if you have any tips, I'm open ;) Perhaps adding an option for the user to set the timeout value.
File "C:\Python27\lib\site-packages\deluge_client\client.py", line 50, in connect self._socket.connect((self.host, self.port)) File "C:\Python27\lib\ssl.py", line 844, in connect self._real_connect(addr, False) File "C:\Python27\lib\ssl.py", line 835, in _real_connect self.do_handshake() File "C:\Python27\lib\ssl.py", line 808, in do_handshake self._sslobj.do_handshake() ssl.SSLError: ('_ssl.c:574: The handshake operation timed out',)