2023/8/30 update
This commit is contained in:
parent
cd15545ec3
commit
4aa890dabd
14
python_jc.py
14
python_jc.py
@ -23,7 +23,6 @@ def check_internet(url='http://www.baidu.com/', timeout=5):
|
|||||||
try:
|
try:
|
||||||
urllib.request.urlopen(url, timeout=timeout)
|
urllib.request.urlopen(url, timeout=timeout)
|
||||||
open_exe('client')
|
open_exe('client')
|
||||||
os.system("taskkill -f -t -im python_jc.exe")
|
|
||||||
return True
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'{ERROR_MSG}{strftime("%Y-%m-%d %H:%M:%S")}: WIFI连接不正常,请检测wifi连接后再试吧')
|
print(f'{ERROR_MSG}{strftime("%Y-%m-%d %H:%M:%S")}: WIFI连接不正常,请检测wifi连接后再试吧')
|
||||||
@ -44,10 +43,10 @@ def check_internet(url='http://www.baidu.com/', timeout=5):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
check_internet()
|
|
||||||
|
|
||||||
sleep(0.4)
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'''def check_python_installation():
|
'''def check_python_installation():
|
||||||
@ -109,4 +108,9 @@ sys.exit()
|
|||||||
else:
|
else:
|
||||||
print('错误:没有输入文字,默认退出!')
|
print('错误:没有输入文字,默认退出!')
|
||||||
sleep(1.5)
|
sleep(1.5)
|
||||||
sys.exit()'''
|
sys.exit()'''
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
check_internet()
|
||||||
|
os.system("taskkill -f -im python_jc.exe")
|
||||||
|
sys.exit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user