updater fixes

This commit is contained in:
ingvar1995 2016-10-15 19:47:02 +03:00
parent ecf045182a
commit 1e6201b3fa
4 changed files with 20 additions and 2 deletions

View file

@ -2,6 +2,7 @@ import util
import os
import settings
import platform
import urllib
try:
from PySide import QtNetwork, QtCore
except ImportError:
@ -9,6 +10,14 @@ except ImportError:
import subprocess
def connection_available():
try:
urllib.request.urlopen('http://216.58.192.142', timeout=1) # google.com
return True
except:
return False
def check_for_updates():
current_version = util.program_version
major, minor, patch = list(map(lambda x: int(x), current_version.split('.')))