Print a message at then end of test

This commit is contained in:
Grégory Soutadé 2016-02-04 20:39:50 +01:00
parent f3c8feb3c5
commit 36d5b0f43b
1 changed files with 6 additions and 1 deletions

View File

@ -4,8 +4,11 @@
import os
from iptogeo import IPToGeo, IPToGeoException
TIMEOUT=3
TIMEOUT = None
# TIMEOUT = 5.0
iptogeo = IPToGeo(timeout=TIMEOUT)
def get_random_ip_v4():
ip = '%d.%d.%d.%d' % \
(ord(os.urandom(1)), ord(os.urandom(1)), ord(os.urandom(1)), ord(os.urandom(1)))
@ -59,3 +62,5 @@ for i in range(0, 1000):
print 'Test %d' % (i)
for proxy in geo_proxy:
test_ip(get_random_ip_v4(), verbose=False, proxy=proxy)
print 'All is OK for me'