Bug fix: Don't crash python if page unavaliable on version checking

This commit is contained in:
Kiooeht 2011-06-15 11:36:17 -07:00
parent 3eb0da7e4f
commit 91c50f9b88

View file

@ -33,11 +33,11 @@ def updateCheck(q,num):
try:
f = urllib.urlopen("http://distantsphere.com/pesterchum.php?" + data)
except:
print "Update check Failure: 1"; q.put((False,1))
print "Update check Failure: 1"; return q.put((False,1))
newest = f.read()
f.close()
if not newest or newest[0] == "<":
print "Update check Failure: 2"; q.put((False,2))
print "Update check Failure: 2"; return q.put((False,2))
try:
(full, major, minor, status, revision, url) = verStrToNum(newest)
except TypeError: