MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / CheckLocalHost

Function CheckLocalHost

tools/deploy.py:25–32  ·  view source on GitHub ↗
(host)

Source from the content-addressed store, hash-verified

23import socket
24
25def CheckLocalHost(host):
26 hostname = socket.gethostname()
27 if host == hostname:
28 return True
29 ip = socket.gethostbyname(hostname)
30 if host == ip:
31 return True
32 return False
33
34def RunWithRetunCode(command):
35 try:

Callers 1

GetPrefixAndSuffixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected