From a0abfee9d08e256b2aaa6624475de6a34490e033 Mon Sep 17 00:00:00 2001
From: Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Date: Thu, 27 Oct 2011 16:35:03 +0200
Subject: [PATCH] remove old code

---
 sfa/util/httpsProtocol.py | 51 ---------------------------------------
 1 file changed, 51 deletions(-)
 delete mode 100644 sfa/util/httpsProtocol.py

diff --git a/sfa/util/httpsProtocol.py b/sfa/util/httpsProtocol.py
deleted file mode 100644
index e6c6be1b..00000000
--- a/sfa/util/httpsProtocol.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import httplib
-import socket
-import sys
-
-
-def is_python26():
-    return False
-    #return sys.version_info[0] == 2 and sys.version_info[1] == 6
-
-# wrapper around standartd https modules. Properly supports timeouts.  
-
-class HTTPSConnection(httplib.HTTPSConnection):
-    def __init__(self, host, port=None, key_file=None, cert_file=None,
-                 strict=None, timeout = None):
-        httplib.HTTPSConnection.__init__(self, host, port, key_file, cert_file, strict)
-        if timeout:
-            timeout = float(timeout)
-        self.timeout = timeout
-
-    def connect(self):
-        """Connect to a host on a given (SSL) port."""
-        if is_python26():
-            from sfa.util.ssl_socket import SSLSocket
-            sock = socket.create_connection((self.host, self.port), self.timeout)
-            if self._tunnel_host:
-                self.sock = sock
-                self._tunnel()
-            self.sock = SSLSocket(sock, self.key_file, self.cert_file)
-        else:
-            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-            sock.settimeout(self.timeout)
-            sock.connect((self.host, self.port))
-            ssl = socket.ssl(sock, self.key_file, self.cert_file)
-            self.sock = httplib.FakeSocket(sock, ssl)
-
-class HTTPS(httplib.HTTPS):
-    def __init__(self, host='', port=None, key_file=None, cert_file=None,
-                     strict=None, timeout = None):
-        # urf. compensate for bad input.
-        if port == 0:
-            port = None
-        self._setup(HTTPSConnection(host, port, key_file, cert_file, strict, timeout))
-
-        # we never actually use these for anything, but we keep them
-        # here for compatibility with post-1.5.2 CVS.
-        self.key_file = key_file
-        self.cert_file = cert_file
-    
-    def set_timeout(self, timeout):
-        if is_python26():
-            self._conn.timeout = timeout
-- 
2.47.0