You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Version 0.21 of django-sslserver fails with a message about the ssl module having 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?The text was updated successfully, but these errors were encountered: