12from urllib.request
import urlopen
14HASHES_URL = sys.argv[1]
19socket.setdefaulttimeout(TIMEOUT)
20for retry
in range(RETRIES):
22 with contextlib.closing(
23 urlopen(HASHES_URL, timeout=TIMEOUT))
as w:
25 with open(sys.argv[2],
'w')
as f:
28 except Exception
as e:
29 print(
'Failed to get uninteresting hashes from %s:' % HASHES_URL)
33 waittime = WAIT_BASE * math.pow(2, retry)
34 print(
'Retry in %d seconds.' % waittime)
def print(*args, **kwargs)
static DecodeResult decode(std::string path)