python_jc
This commit is contained in:
parent
738bfe35d6
commit
65d292fb54
@ -18,7 +18,7 @@ def open_exe(exe_name):
|
|||||||
print(file_error)
|
print(file_error)
|
||||||
sleep(1)
|
sleep(1)
|
||||||
pass
|
pass
|
||||||
def check_internet(url='http://www.baidu.com/', timeout=3):
|
def check_internet(url='http://www.baidu.com/', timeout=5):
|
||||||
try:
|
try:
|
||||||
urllib.request.urlopen(url, timeout=timeout)
|
urllib.request.urlopen(url, timeout=timeout)
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user