We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,麻烦请教一下,我将ADSL_CYCLE设置为21600秒后,时间到达了,线程却没有循环执行,是什么原因,平时都在写Java,不知道Python是怎么休眠的 while True: print('ADSL Start, Remove Proxy, Please wait') self.remove_proxy() (status, output) = subprocess.getstatusoutput(ADSL_BASH) if status == 0: print('ADSL Successfully') ip = self.get_ip() if ip: print('Now IP', ip) print('Testing Proxy, Please Wait') proxy = '{ip}:{port}'.format(ip=ip, port=PROXY_PORT) if self.test_proxy(proxy): print('Valid Proxy') self.set_proxy(proxy) print('Sleeping') time.sleep(ADSL_CYCLE) else: print('Invalid Proxy') else: print('Get IP Failed, Re Dialing') time.sleep(ADSL_ERROR_CYCLE) else: print('ADSL Failed, Please Check') time.sleep(ADSL_ERROR_CYCLE)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
你好,麻烦请教一下,我将ADSL_CYCLE设置为21600秒后,时间到达了,线程却没有循环执行,是什么原因,平时都在写Java,不知道Python是怎么休眠的
while True:
print('ADSL Start, Remove Proxy, Please wait')
self.remove_proxy()
(status, output) = subprocess.getstatusoutput(ADSL_BASH)
if status == 0:
print('ADSL Successfully')
ip = self.get_ip()
if ip:
print('Now IP', ip)
print('Testing Proxy, Please Wait')
proxy = '{ip}:{port}'.format(ip=ip, port=PROXY_PORT)
if self.test_proxy(proxy):
print('Valid Proxy')
self.set_proxy(proxy)
print('Sleeping')
time.sleep(ADSL_CYCLE)
else:
print('Invalid Proxy')
else:
print('Get IP Failed, Re Dialing')
time.sleep(ADSL_ERROR_CYCLE)
else:
print('ADSL Failed, Please Check')
time.sleep(ADSL_ERROR_CYCLE)
The text was updated successfully, but these errors were encountered: