This commit is contained in:
Jing Ling
2020-09-16 20:57:45 +08:00
parent 78ec725862
commit 0191b25923
+2 -4
View File
@@ -506,10 +506,8 @@ def delete_file(*paths):
@tenacity.retry(stop=tenacity.stop_after_attempt(3)) @tenacity.retry(stop=tenacity.stop_after_attempt(3))
def check_net(): def check_net():
logger.log('INFOR', 'Checking Internet environment') logger.log('INFOR', 'Checking Internet environment')
urls = ['http://www.example.com', 'http://www.baidu.com', urls = ['http://www.baidu.com', 'http://www.bing.com',
'http://www.bing.com', 'http://www.taobao.com', 'http://www.apple.com', 'http://www.microsoft.com']
'http://www.linkedin.com', 'http://www.msn.com',
'http://www.apple.com', 'http://microsoft.com']
url = random.choice(urls) url = random.choice(urls)
logger.log('INFOR', f'Trying to access {url}') logger.log('INFOR', f'Trying to access {url}')
session = requests.Session() session = requests.Session()