MCPcopy Create free account
hub / github.com/ActiveState/code / check

Function check

recipes/Python/440647_Smart_Links/recipe-440647.py:32–41  ·  view source on GitHub ↗
(links)

Source from the content-addressed store, hash-verified

30 return links
31
32def check(links):
33 from socket import socket
34 for index in range(len(links)):
35 try:
36 test = socket()
37 test.settimeout(0.05)
38 test.connect((links[index][0], 80))
39 except:
40 links[index][0] = None
41 return links
42
43def write(links):
44 string = str()

Callers 1

buildFunction · 0.70

Calls 3

rangeFunction · 0.85
settimeoutMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected