Skip to content

SSLError has no attribute 'reason' #5

@McSwindler

Description

@McSwindler

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',)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions