diff --git a/imcsdk/imcdriver.py b/imcsdk/imcdriver.py index 01ffad7b..37414a73 100644 --- a/imcsdk/imcdriver.py +++ b/imcsdk/imcdriver.py @@ -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)