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

Method get_names

Lib/urllib/request.py:1457–1465  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1455 # names for the localhost
1456 names = None
1457 def get_names(self):
1458 if FileHandler.names is None:
1459 try:
1460 FileHandler.names = tuple(
1461 socket.gethostbyname_ex('localhost')[2] +
1462 socket.gethostbyname_ex(socket.gethostname())[2])
1463 except socket.gaierror:
1464 FileHandler.names = (socket.gethostbyname('localhost'),)
1465 return FileHandler.names
1466
1467 # not entirely sure what the rules are here
1468 def open_local_file(self, req):

Callers 1

_is_local_authorityFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected