MCPcopy Index your code
hub / github.com/python/cpython / make_connection

Method make_connection

Lib/xmlrpc/client.py:1342–1354  ·  view source on GitHub ↗
(self, host)

Source from the content-addressed store, hash-verified

1340 # FIXME: mostly untested
1341
1342 def make_connection(self, host):
1343 if self._connection and host == self._connection[0]:
1344 return self._connection[1]
1345
1346 if not hasattr(http.client, "HTTPSConnection"):
1347 raise NotImplementedError(
1348 "your version of http.client doesn't support HTTPS")
1349 # create a HTTPS connection object from a host descriptor
1350 # host may be a string, or a (host, x509-dict) tuple
1351 chost, self._extra_headers, x509 = self.get_host_info(host)
1352 self._connection = host, http.client.HTTPSConnection(chost,
1353 None, context=self.context, **(x509 or {}))
1354 return self._connection[1]
1355
1356##
1357# Standard server proxy. This class establishes a virtual connection

Callers

nothing calls this directly

Calls 1

get_host_infoMethod · 0.80

Tested by

no test coverage detected