bug fix
This commit is contained in:
parent
f5148e7d34
commit
3e4533f737
10
main.py
10
main.py
@ -44,18 +44,24 @@ def main():
|
|||||||
i = 0
|
i = 0
|
||||||
j = 0
|
j = 0
|
||||||
while(1):
|
while(1):
|
||||||
ascii_tag()
|
|
||||||
if not network_test(): #网络异常
|
if not network_test(): #网络异常
|
||||||
i +=1 #异常计数 3次失败重启
|
i +=1 #异常计数 3次失败重启
|
||||||
|
ascii_tag()
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
else: #网络正常
|
else: #网络正常
|
||||||
i = 0
|
i = 0
|
||||||
|
ascii_tag()
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
if (i > 2): #异常3次
|
if (i > 2): #异常3次
|
||||||
if not network_restart(): #接口重启失败
|
if not network_restart(): #接口重启失败
|
||||||
|
ascii_tag()
|
||||||
|
print("接口错误,输入回车后退出。")
|
||||||
input()
|
input()
|
||||||
|
exit()
|
||||||
else: #接口重启完成
|
else: #接口重启完成
|
||||||
i = 0
|
i = 0
|
||||||
|
j += 1
|
||||||
|
ascii_tag()
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user