Pavel Loginov 4 years ago
parent 0f1c889165
commit e5d2626b05

@ -1067,7 +1067,7 @@ def check_ver():
def check_new_version(**kwargs):
import requests
import sql
current_ver = check_ver()
proxy = sql.get_setting('proxy')
if kwargs.get('service'):
@ -1079,9 +1079,11 @@ def check_new_version(**kwargs):
if proxy is not None and proxy != '' and proxy != 'None':
proxyDict = { "https" : proxy, "http" : proxy }
response = requests.get('https://haproxy-wi.org/update.py?last_ver'+last_ver+'=1', timeout=1, proxies=proxyDict)
else:
requests.get('https://haproxy-wi.org/update.py?ver_send='+current_ver, timeout=1, proxies=proxyDict)
else:
response = requests.get('https://haproxy-wi.org/update.py?last_ver'+last_ver+'=1', timeout=1)
requests.get('https://haproxy-wi.org/update.py?ver_send='+current_ver, timeout=1)
res = response.content.decode(encoding='UTF-8')
except requests.exceptions.RequestException as e:
e = str(e)

Loading…
Cancel
Save