Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The socket package has no sslerror module #36

Open
Pantoofle opened this issue Jan 9, 2022 · 1 comment · May be fixed by #54
Open

The socket package has no sslerror module #36

Pantoofle opened this issue Jan 9, 2022 · 1 comment · May be fixed by #54

Comments

@Pantoofle
Copy link

Pantoofle commented Jan 9, 2022

raise socket.sslerror("Invalid SSL version '%s' requested for tls_version '%s'" % (self.ssl_version, self.tls_level))

The socket package has no sslerror module (see the doc here)
The ssl package has something close. Maybe there were a confusion between the two packages ?

So if an invalid ssl_version is given, the program crashes before raising the error.

@piyueh
Copy link
Member

piyueh commented Mar 25, 2022

Yah, that's from Python 2's socket module and does not exist anymore in Python 3:
https://github.com/python/cpython/blob/8d21aa21f2cbc6d50aab3f420bb23be1d081dac4/Lib/socket.py#L67

PR's welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants