try: turn_off_server_verify = { 'context' : ssl._create_unverified_context() }
except: turn_off_server_verify = {}
-from httplib import HTTPS, HTTPSConnection
-
from sfa.util.py23 import xmlrpc_client
+from sfa.util.py23 import http_client
try:
from sfa.util.sfalogging import logger
# create a HTTPS connection object from a host descriptor
# host may be a string, or a (host, x509-dict) tuple
host, extra_headers, x509 = self.get_host_info(host)
- conn = HTTPSConnection(host, None, key_file = self.key_file,
- cert_file = self.cert_file,
- **turn_off_server_verify)
+ conn = http_client.HTTPSConnection(host, None, key_file = self.key_file,
+ cert_file = self.cert_file,
+ **turn_off_server_verify)
# Some logic to deal with timeouts. It appears that some (or all) versions
# of python don't set the timeout after the socket is created. We'll do it
self.url = url
xmlrpc_client.ServerProxy.__init__(self, url, transport, allow_none=allow_none,
verbose=verbose,
- **turn_off_server_verify)
+ **turn_off_server_verify)
def __getattr__(self, attr):
- logger.debug ("xml-rpc %s method:%s" % (self.url, attr))
+ logger.debug("xml-rpc %s method:%s" % (self.url, attr))
return xmlrpc_client.ServerProxy.__getattr__(self, attr)
########## the object on which we can send methods that get sent over xmlrpc