MCPcopy
hub / github.com/MikeChongCan/scylla / get_current_ip

Function get_current_ip

scylla/validator.py:15–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def get_current_ip():
16 global __CURRENT_IP__
17 if __CURRENT_IP__:
18 # logger.debug('get_current_ip from cache')
19 return __CURRENT_IP__
20 else:
21 # logger.debug('fetch current_ip')
22 r = requests.get(IP_CHECKER_API)
23 j = json.loads(r.text)
24 __CURRENT_IP__ = j['ip']
25 return __CURRENT_IP__
26
27
28class Validator(object):

Callers 1

validate_proxyMethod · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected