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

Method _encode_hostname

Lib/ssl.py:441–447  ·  view source on GitHub ↗
(self, hostname)

Source from the content-addressed store, hash-verified

439 return self
440
441 def _encode_hostname(self, hostname):
442 if hostname is None:
443 return None
444 elif isinstance(hostname, str):
445 return hostname.encode('idna').decode('ascii')
446 else:
447 return hostname.decode('ascii')
448
449 def wrap_socket(self, sock, server_side=False,
450 do_handshake_on_connect=True,

Callers 3

wrap_bioMethod · 0.95
shim_cbMethod · 0.95
_createMethod · 0.80

Calls 2

decodeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected