From 0ad93d24cd833248eb1eb4eb37ad3b95a5d23f58 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 30 Dec 2010 21:46:41 +0100 Subject: [PATCH] try again to use httplib.HTTPSConnection instead of deprecated httplib.HTTPS --- sfa/util/xmlrpcprotocol.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sfa/util/xmlrpcprotocol.py b/sfa/util/xmlrpcprotocol.py index 67d6d626..d06d1304 100644 --- a/sfa/util/xmlrpcprotocol.py +++ b/sfa/util/xmlrpcprotocol.py @@ -34,17 +34,13 @@ class XMLRPCTransport(xmlrpclib.Transport): import httplib host, extra_headers, x509 = self.get_host_info(host) try: - HTTPS = httplib.HTTPS() -# xxx sfa-1.0-10-broken - non-working attempt for python-2.7 -# HTTPS = httplib.HTTPSConnection(host, None) +# HTTPS = httplib.HTTPS() + HTTPS = httplib.HTTPSConnection(host, None) except AttributeError: - raise NotImplementedError( - "your version of httplib doesn't support HTTPS" - ) + raise NotImplementedError("your version of httplib doesn't support HTTPSConnection") else: - return httplib.HTTPS(host, None, key_file=self.key_file, cert_file=self.cert_file) #**(x509 or {})) -# xxx sfa-1.0-10-broken - non-working attempt for python-2.7 -# return httplib.HTTPSConnection(host, None, key_file=self.key_file, cert_file=self.cert_file) #**(x509 or {})) +# return httplib.HTTPS(host, None, key_file=self.key_file, cert_file=self.cert_file) #**(x509 or {})) + return httplib.HTTPSConnection(host, None, key_file=self.key_file, cert_file=self.cert_file) #**(x509 or {})) def getparser(self): unmarshaller = ExceptionUnmarshaller() -- 2.43.0