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

Support Ubuntu 16.04 LTS #93

Open
ssokolow opened this issue Dec 4, 2019 · 0 comments
Open

Support Ubuntu 16.04 LTS #93

ssokolow opened this issue Dec 4, 2019 · 0 comments

Comments

@ssokolow
Copy link

ssokolow commented Dec 4, 2019

Version 0.21 of django-sslserver fails with a message about the ssl module having no attribute 'PROTOCOL_TLS'

  File "[elided for brevity]/sslserver/management/commands/runsslserver.py", line 15, in <module>
    _ssl_version = ssl.PROTOCOL_TLS
AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS'

According to the Python 3.5 docs, this attribute was introduced in Python 3.5.3 but Ubuntu-family distros based on 16.04 LTS are still on 3.5.2.

It looks like you are attempting to do a version check, but it's assuming that all 3.x Python versions have this attribute.

Might I suggest taking a page out of the web "detect features, not browsers" playbook and using hasattr(ssl, 'PROTOCOL_TLS') instead?

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

No branches or pull requests

1 participant