Following c5cfe63f, fix other bad uses of sys.hexversion

parent 22950170
......@@ -117,7 +117,7 @@ class ProxyHTTPSConnection(ProxyHTTPConnection):
def connect(self):
ProxyHTTPConnection.connect(self)
#make the sock ssl-aware
if sys.hexversion < 0x20709f0:
if sys.version_info < (2, 6, 6):
ssl = socket.ssl(self.sock, self.key_file, self.cert_file)
self.sock = six.moves.http_client.FakeSocket(self.sock, ssl)
else:
......@@ -287,7 +287,7 @@ class GsiRest(object):
# Versions of Python earlier than 2.7.9 don't use SSL Context
# objects for this purpose, and do not do any server cert verification.
ssl_context = None
if sys.hexversion >= 0x20709f0:
if sys.version_info >= (2, 6, 6):
# Use the new method with SSL Context
# Prepare SSL context
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment