Skip to content

Commit

Permalink
make compatible with rhel/centos 7 system python (CiscoUcs#154)
Browse files Browse the repository at this point in the history
The support for PEP 476 (along with the required PEP 466 (Network
Security Enhancements for Python 2.7.x)) was added to python 2.7.5 and
first released as part of Red Hat Enterprise Linux 7.2.
https://access.redhat.com/articles/2039753
Version checks on rhel systems are not very relaible.
  • Loading branch information
vadimkuznetsov authored and vvb committed Oct 26, 2017
1 parent 0a0727f commit 8cb4439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imcsdk/imcdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def connect(self):
self.sock = sock
self._tunnel()

if sys.version_info >= (2, 7, 9):
if hasattr(ssl, 'SSLContext'):
# Since python 2.7.9, tls 1.1 and 1.2 are supported via
# SSLContext
ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
Expand Down

0 comments on commit 8cb4439

Please sign in to comment.