summaryrefslogtreecommitdiffstats
path: root/abs/core/func/func_ssl_patch
blob: cccfe4a2515d0cd9168e9c6ed092415478c52566 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/func/overlord/sslclient.py
+++ b/func/overlord/sslclient.py
@@ -23,7 +23,11 @@ class SSL_Transport(xmlrpclib.Transport):
             # Yay for Python 2.2
             pass
         _host, _port = urllib.splitport(host)
-        return SSLCommon.HTTPS(_host, int(_port), ssl_context=self.ssl_ctx, timeout=self._timeout)
+        if hasattr(xmlrpclib.Transport, 'single_request'):
+            cnx_class = SSLCommon.HTTPSConnection
+        else:
+            cnx_class = SSLCommon.HTTPS
+        return cnx_class(_host, int(_port), ssl_context=self.ssl_ctx, timeout=self._timeout)