MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_names

Method get_names

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

Source from the content-addressed store, hash-verified

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

Callers 1

_is_local_authorityFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected