mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
make update check more fault tolerant
This commit is contained in:
parent
b12460f225
commit
0f3ad34af2
1 changed files with 6 additions and 5 deletions
|
@ -50,12 +50,13 @@ class LatestVersionFinder(QThread):
|
|||
d = urllib.urlencode(d)
|
||||
try:
|
||||
f = urllib2.urlopen(baseUrl + "getQtVersion", d)
|
||||
except (urllib2.URLError, httplib.BadStatusLine):
|
||||
resp = f.read()
|
||||
if not resp:
|
||||
return
|
||||
resp = simplejson.loads(resp)
|
||||
except:
|
||||
# behind proxy, corrupt message, etc
|
||||
return
|
||||
resp = f.read()
|
||||
if not resp:
|
||||
return
|
||||
resp = simplejson.loads(resp)
|
||||
if resp['latestVersion'] > ankiqt.appVersion:
|
||||
self.emit(SIGNAL("newVerAvail"), resp)
|
||||
diff = resp['currentTime'] - time.time()
|
||||
|
|
Loading…
Reference in a new issue